We know the secret of your success
PAPER TITLE: SOFTWARE DEVELOPMENT WITH JAVA
DATE: Friday, 12 October 2012
PART 1
Question 1 Which two of the following statements about object-oriented software are true? (Select two options)
A. Javadoc is an example of a design tool.
B. Maintenance can involve adding extra functionality to the system.
C. A link in an object diagram illustrates the connection between an object and its corresponding real-world entity.
D. Developing a dynamic model typically involves decisions such as which existing classes can be reused and what programming constructs are appropriate.
E. An object diagram does not imply anything about how links between objects are implemented.
ANSWERS(Purchase full paper to get all the solution) C. A link in an object diagram illustrates the connection between an object and its corresponding real-world entity. D. Developing a dynamic model typically involves decisions such as which existing classes can be reused and what programming constructs are appropriate.
Question 2 Based on the information above which two of the following statements are true? (Select two options)
A. The diagram is a static model
B. The diagram shows that there is a collaboration between team6 and fixture2
C. The diagram shows how the objects in it interact.
D. The diagram shows that “Panthers“ is an attribute of team3 .
E. The diagram shows that fixture2 has attributes date, homepoints and awayPoints
Question 3 Which two of the following statements relating to the requirements specification process are true? (Select two options)
‘Patients listed in the Discharged Patients report should be arranged in alphabetical order of their names.’
‘The Discharged Patients report should be printed on a separate page for each ward in the hospital.’
‘The software should allow the patient’s move to another ward to be recorded.’
of constraints on the system that are not linked to behavioural requirements as these are factors that should be considered in the design phase of development.
Question 4 Which two of the following statements about conceptual modelling are true? (Select two options)
A Team object is linked to exactly one ConsultantDoctor object
is not considered to be an invariant because the class diagram records the fact by having a multiplicity of 1 at the ConsultantDoctor end of isHeadedBy.
Question 5 Which two of the following statements about conceptual modelling are true? (Select two options)
Question 6 Based on the information in Figure 2 above, which two of the following statements are true? (Select two options)
0..*.
Question 7 Which three of the following statements are true? (Select three options)
Question 8 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? (Select one option)
A. X is RestaurantCoord; Y is (reservation2, customer4); Z is table6
B. X is RestaurantCoord; Y is customer4; Z is table6
C. X is restaurant; Y is (reservation2, customer4); Z is table6
D. X is restaurant; Y is customer4; Z is table6
E. X is restaurant; Y is customer4; Z is (table6, 31/12/12)
Question 9 On the basis of the information provided in Figure 3 and 4, which two of the following statements are true? (Select two options)
Question 10 On the basis of information provided in Figure 3 and 4, which two of the following statements are true? (Select two options)
Customer getCustomer()
B. A method whose specification begins as follows is appropriate for the protocol of RestaurantCoord:
Table getTable()
C. A method whose specification begins as follows is appropriate for the protocol of RestaurantCoord:
Map getTablesAndCustomers(M256Date aDate)
D. A method whose specification begins as follows is appropriate for the protocol of RestaurantCoord: Map getTablesAndCustomers(M256Date aDate)
E. A method whose specification begins as follows is appropriate for the protocol of Table:
Question 11 Which two of the following statements about designing software are true? (Select two options)
Question 12 Which two of the following statements about detailed design and implementation are true? (Select two options)
Question 13 Which two of the following statements relating to design and Java 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 Which two of the following statements about building a graphical user interface (GUI) 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)
PART 2
This part contains four questions, each worth 20 marks. You should attempt three of these questions.
Question 21 (20 marks)
The following is an extract from a requirements document for a system to help manage a company which operates a group of children’s zoos.
System domain
The company oversees the running of several children’s zoos, each with a different name. Each zoo exhibits at least 50 animals with no upper limit on the number exhibited. Animals are not moved from zoo to zoo. Both pets (tortoises, rabbits, etc.) and wild animals (owls, badgers, etc.) are exhibited in each zoo. Each animal has a name which is unique throughout the company.
A family may adopt one or more animals, which means that they make a regular contribution towards the feeding of those animals. An animal may be adopted by at most four families at any one time. The system only keeps records of families that currently adopt animals and details of current adoptions. It does not keep records of previous adoptions nor of families that currently are not adopting any animal.
From time to time each zoo plans special events, to each of which are invited up to 15 of the families which adopt animals at that zoo. No more than three special events may be planned by a zoo at a time. Each special event is held at the zoo on a specific date and has a limit (less than 16) on the number of families which may be invited to it. This system only needs to deal with future planned special events; no record is kept of such events in the past.
In addition to being invited to special events, a family may, if it is adopting a pet, visit that animal in its enclosure with a guide on one occasion only. A family may make any number of further unguided visits to a pet it has adopted but no record is kept of these unguided visits.
Use cases
List Animals. The administrator identifies a zoo. The system displays the name of each animal at that zoo together with its species (rabbit, owl, etc.) and, if the animal is a wild animal, a description of its natural habitat, e.g. ‘Marshland’.
Visit Animal. The administrator identifies an adopting family, and a pet that the family has adopted. The family should not already have visited the animal with a guide. The system records that the family has visited the animal.
List Zoo and Adopting Families. The administrator identifies an animal. The system displays the name of the zoo where the animal is exhibited. It also displays (if the animal has been adopted) the names and addresses of the families which have adopted the animal with the dates on which the adoptions began and the amounts per week that the adoptions cost.
Invite Family. The administrator identifies a special event and a family that adopts an animal at the zoo holding the event. If the event’s limit has already been reached the system informs the administrator of this fact. Otherwise, the system records that the family is invited to the event.
Question 22 (20 marks)
The following unfinished class diagram is a part of a structural model being developed for a dental surgery’s appointment booking system.
The following is a description of one of the use cases for this system.
Cancel Appointment
The receptionist identifies a patient and provides a date. The patient must have an appointment for that date. The system records the cancellation of the appointment. The number of cancellations made by the patient is incremented by 1. The cancelled appointment and all information about it is removed from the system.
The object diagram below shows the relevant objects and links for a particular scenario of the use case, before the use case is initiated. In particular it shows all the Appointment objects linked to patient4.
(2 marks)
(3 marks)
(4 marks)
Question 23 (20 marks)
Consider the following class diagram and class descriptions extracted from an implementation model for a faculty library’s loan system. Then answer the parts (a) and (b) which follow. 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 two parts are based on dynamic models which are given later.
The following class diagram and class descriptions are part of an implementation model for the Library System, a system for a library in a faculty with departments of Mathematics, Computing and Technology. The library has books that are categorised as either Maths, Computing or Technology. Members of the library can have up to 6 books on loan at any one time.
Note that for the purposes of this question many attributes have been omitted, such as author for the class Book and IDNumber for the class Member.
The system employs the class Name as specified on pages 14 and 15 of the M256 Handbook. It also employs a user-defined type, Category.
The following table sets out a test case specification for a test of the method hasOnLoan(aCategory) in the class Member.
Read the following notes and then write a JUnit test method test1HasOnLoan() corresponding to the test case specified in Table 1.
Notes:
(9 marks)
List a Member's Books on Loan for a Category
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.
(5 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 Change Ward screen allows the user to initiate the Change a Patient’s Ward use case. Here is a description of this use case.
Change a Patient’s Ward
The administrator identifies a patient and a ward, both known to the system.
The ward must be different from the ward that the patient is currently on. The ward must be of type male if the patient is male and of type female if the patient is female. The ward must have at least one free bed.
The system records that the patient is no longer on the original ward and is now on the new ward.
Imagine that a user interface designer has worked on the Change a Patient’s Ward use case and has decided that the user will select from a scrollable list of the names of all the patients in the hospital. When the user makes this selection a text field will display the name of the ward the patient is currently on. A second scrollable list will display the names of all the available wards i.e. all the other wards of the same type (male or female) that have at least one free bed. When the Change Ward screen is first displayed the first name in the list of patient names is selected by default, the text field displays the name of that patient’s ward and the list of ward names displays the names of wards of the correct type for the patient that the patient is not currently on and with at least one free bed.
The user selects a new ward from the second list for the selected patient and clicks the Change ward button. The change of ward is recorded and the details are confirmed by a message in a text area.
This is illustrated by the design sketch in Figure 13.
When this design is implemented the GUI will communicate with the core system implemented in the package hospitalcore which includes a coordinating class HospCoord and several other core classes including Patient and Ward.
Below are extracts from the Javadoc for some methods of the core system classes, some, but not all of which are required for building the Change Ward screen.
Below are some notes on the GUI that you will need to answer parts (i) and (ii).
[END OF QUESTION PAPER]
Purchase full paper by adding to cart
Last updated: Sep 02, 2021 12:26 PM
Your one-stop website for academic resources, tutoring, writing, editing, study abroad application, cv writing & proofreading needs.