We know the secret of your success
PAPER TITLE: SOFTWARE DEVELOPMENT WITH JAVA
DATE: Tuesday, 12 September 2017
PART 1
Question 1 Which two of the following statements about software development are true? (Select two options)
A. Developing a dynamic model typically involves decisions such as what programming constructs are appropriate and which existing classes can be reused.
B. The Waterfall method is an example of an adaptive software development method.
C. UML is useful for producing diagrams at an appropriate level of abstraction.
D. An initial structural model of a system is a static model that illustrates the state of the system at a particular time.
E. Enhancing the system by adding extra facilities is part of the maintenance phase.
ANSWERS(Purchase full paper to get all the solution)
Question 2 Based on the information in figure 1 which two of the following statements are true? (Select two options)
A. isAwayTeam is the association which illustrates the relationship between team7 and fixture2. B. The diagram shows the state of part of the system at a particular point in time. C. The diagram shows that the state of fixture2 is date, homeScore and awayScore. D. The diagram shows a collaboration between team6 and fixture2. E. The diagram shows that name is an attribute of team7.
Question 3 Which two of the following statements relating to the requirements specification process are true? (Select two options)
‘The memory requirements of the software must not exceed 3TB.’
‘The software should allow the patient’s move to another ward to be recorded.’
Question 4 Which two of the following statements about conceptual modelling are true? (Select two options)
Question 5 The following is an extract from a requirements document for a system for a tap dance school. The incomplete class diagram below forms part of a conceptual model for the system.
Based on the information provided in figure 2, which two of the following statements are true? (Select two options)
Question 6 The following is an extract from a requirements document for a property management company’s system. The incomplete class diagram below forms part of a conceptual model for the system.
Based on the information given above which two of the following statements are true? (Select two options)
Each Tenant object must be linked to at least one Property object via rents.
If a LandLord object aLandLord and a Property object aProperty are linked via owns, aLandlord and aProperty are linked via rents.
If a LandLord object aLandLord and a Property object aProperty are not linked via rents, then aLandlord and aProperty are linked via owns.
Question 7 Which two of the following statements are true? (Select two options)
Question 8 Which two of the following statements about object-oriented software development are true? (Select two options)
Question 9 Which one of the following statements is a correct identification of the missing text indicated by the labels X, Y and Z in the sequence diagram in figure 5. (Select one option)
A. X is DINNER; Y is customer7; Z is table2 B. X is LUNCH; Y is customer3; Z is table2 C. X is LUNCH; Y is customer3; Z is table4 D. X is DINNER; Y is customer3; Z is table4 E. X is LUNCH; Y is customer7; Z is table4
Question 10 On the basis of the information above which two of the following statements are true? (Select two options)
Question 11 On the basis of information provided in figure 5, which two of the following statements are true? (Select two options)
A. A method whose specification begins as follows is appropriate for the protocol of RestaurantCoord: Customer getCustomer()
B. A method whose specification begins as follows is appropriate for the protocol of RestaurantCoord:
Map getTablesAndCustomers(M256Date aDate, Sitting aSitting)
C. A method whose specification begins as follows is appropriate for the protocol of RestaurantCoord:
D. A method whose specification begins as follows is appropriate for the protocol of Sitting:
Sitting getSitting()
E. A method whose specification begins as follows is appropriate for the protocol of Reservation:
Table getTable()
Question 12 Which two of the following statements about designing software are true? (Select two options)
Question 13 Which two of the following statements about detailed design and implementation are true? (Select two options)
Question 14 Which two of the following statements about implementation and testing are true? (Select two options)
Question 15 Which two of the following statements about the M256 approach to implementing software in Java are true? (Recall that in M256 the first code iteration is the first stage in implementing a core system.) (Select two options)
Question 16 Which two of the following statements about user interfaces and their design are true? (Select two options)
Question 17 Which two of the following statements about user interfaces and their design are true? (Select two options)
Question 18 In the M256 approach to building a graphical user interface (GUI), which two of the following statements are true? (Select two options)
Question 19 Which two of the following statements are true? (Select two options)
Question 20 Which two of the following statements are true? (Select two options)
Different objects need to react to changes in another object to which they are otherwise unrelated.
PART 2
This part contains four questions, each worth 20 marks. You should attempt three of these questions.
Question 21 The following is an extract from a requirements document for a part of a school’s assessment handling system for a single year group in a single school year. This part of the system deals with exams and assignments, scripts of which are submitted by students and marked by teachers.
System domain
There are two kinds of assessment handled by the system: exams and assignments. Each piece of assessment, either an exam or an assignment, tests one subject taught at the school. Each subject is tested by at least two pieces of assessment. Each exam is authored by exactly two teachers, each of whom must teach the subject tested by the exam. Teachers are employed to teach at least one subject. Some teachers do not author exams, but those who do are allowed to author at most four in any one year. No record is kept of the authorship of assignments. Each assessment is checked by one teacher who teaches the subject being assessed and the teacher who has checked the assessment is recorded. Exams cannot be checked by their authors.
Students, who study at least five and at most ten subjects, submit scripts for at most four pieces of assessment for each subject that they study. Each script a student submits is for a different piece of assessment. Students do not submit scripts for assessment of subjects that they do not study.
Each script is marked by one teacher who is allocated when the script is submitted. A teacher may mark any number of scripts but only for assessments in subjects that they teach. Each script is awarded a mark out of one hundred which is recorded.
Use cases
List scripts submitted for a subject. The user identifies a subject. The system displays the name of the subject and for each script for each assessment testing that subject, the ID of the student who submitted the script, the assessment code, the submission date of the script and the name of the teacher marking the script.
Record new assignment. The user identifies the subject tested by the assignment. The user provides the assessment code and assessment date and the last extension date, beyond which assignment script submissions are not allowed. The system records that there is a new assignment for the subject together with all the relevant information provided.
Note that in this question you are dealing with a conceptual model. You will lose marks for including in your answers anything that is not relevant for a conceptual model.
Figure 6 is an incomplete class diagram for a conceptual model with five classes unnamed and all the associations omitted.
Question 22 (20 marks)
The following unfinished class diagram is a part of a structural model being developed for a hotel administration system.
HotelCoord is the coordinating class.
The following extract from the textual part of the structural model being developed omits some details that are not relevant for this question.
The following is a description of one of the use cases for this system.
Note that the system deals with only a single hotel and each reservation is for only one night in one room.
Cancel a reservation
The user identifies a guest and a hotel night. If there is no reservation for the guest for the hotel night, the user is informed of this. Otherwise, the loyalty points of the guest are reduced by 1 and the reservation that is to be cancelled and all information about it is removed from the system.
The object diagram in Figure 8 shows the relevant objects and links for a particular scenario of the use case, before the use case is initiated.
Give the complete sequence diagram in your answer book.
Question 23 (20 marks)
Consider the class diagram in Figure 11 and class descriptions, extracted from an implementation model for a small airline administration system, the Airline System. Then answer part (a) which follows. You are advised to read the questions first and then refer to the extract from the implementation model in order to answer them. Note that this question contains four parts in all. The last three parts, (b), (c) and (d), are based on dynamic models which are given later.
The Figure 11 class diagram and following class descriptions are part of an implementation model for the Airline System.
Read the table and the following notes and then complete the body, given below, of the JUnit test method test1Book corresponding to the test case.
Notes:
One use case in the Airline System is the following:
Book Flight for Existing Passenger
The user identifies a passenger and a flight. The flight must not have been booked already by the passenger. If the flight is already fully booked then the user is informed of this but otherwise the system records the booking of the passenger for the flight with the date of the booking.
The following are dynamic models for a design for the above use case. Use the scenario illustrated in the object diagrams in Figures 12 and 13 and the walk-through, and sequence diagram in Figure 14 for the scenario to answer parts (b), (c) and (d) which follow.
You should not include methods that would be implemented in the first code iteration and should only include methods that are specified in the class descriptions. Do not include additional methods that might be needed for testing. For each method give its class and its name. (4 marks)
Question 24 (20 marks)
(a) This part of the question is about improving an initial prototype graphical user interface (GUI) design for a central heating controller application to run on a desktop computer as part of a home automation system. Read the descriptions below, then answer the questions that follow.
The design is comprised of two screens, as shown below.
The first screen
The first screen allows a user to choose to edit the settings either for central heating or for hot water. For each of these options, the user can choose to edit the settings either for weekdays or weekends.
From the first screen the user can navigate via a button (Set) to the second screen.
The second screen
The second screen is for setting central heating or hot water times, depending on the choice made on the first screen.
This screen uses labels ‘1 2 3 4 5’ to represent weekdays and ‘6 7’ to represent the weekend, so the first row of times displayed relates to weekdays and the second to weekends. For each of the weekdays, and for the weekend, four corresponding times are displayed: two times when the central heating/hot water comes on, and two times when it goes off. (Individual days of the week all have the same ‘weekday’ settings.)
Although the second screen shows two rows of times, only one of them can be edited, according to the choice made on the first screen between weekday and weekend. So, two on-times and two off- times can be set, one by one, by selecting the time using the appropriate radio button, and incrementing and decrementing the time displayed using the + and – buttons.
Clicking on the Back button returns the user to the first screen.
The Remove Order screen allows the user to initiate the Remove Order use case. Here is a description of this use case.
The user identifies the order. All information relating to that order is removed from the system.
Imagine that a user interface designer has worked on the Remove Order use case and has decided that the user will select from a scrollable list of all order due dates. When the user makes this selection a second scrollable list will display, for each order with the selected due date, the unique identification number of that order.
The user then selects the relevant identification number from the second list and clicks the Remove Order button to remove the order.
This is illustrated by the design sketch in Figure 16.
When this design is implemented the GUI will communicate with a core system which, as well as a class Order, defines a coordinating class CompanyCoord.
Below are extracts from the Javadoc for some of the methods of these classes.
Class CompanyCoord
Method summary:
getOrders
public java.util.Collection getOrders()
Returns all orders placed with the company.
Returns:
a collection of all the Order objects
remove
public void remove(Order anOrder)
Records the removal of the order corresponding to anOrder.
This is the coordinating method for Remove Order.
Parameters:
anOrder – an order
getOrdersForDate
public java.util.Collection
getOrdersForDate(M256Date aDate)
Returns all orders due on the given date.
a collection of all Order objects with dueDate value aDate
Class Order
getDueDate
public M256Date getDueDate()
Returns the due date of this order.
dueDate
getIdNumber
public String getIdNumber()
Returns the identification number of this order.
idNumber
Although several orders may have the same due date, each date should be listed only once. The dates are not required to be displayed in chronological order.
You should assume that:
The displayIdNumbersForDate() method should display, in the second list, the identification number of each order with the selected due date, with the first identification number in the list selected by default. You should assume that:
You can assume that an order has been selected in the second list. You do not need to be concerned with what happens when the very last order is removed. (3 marks)
[END OF QUESTION PAPER]
Purchase full paper by adding to cart
Last updated: Sep 02, 2021 12:21 PM
Your one-stop website for academic resources, tutoring, writing, editing, study abroad application, cv writing & proofreading needs.