Premium Resources

We know the secret of your success

M256/M Software development with Java Undergraduate Level Course Examination 2008

$39.00

PAPER TITLE: SOFTWARE DEVELOPMENT WITH JAVA

DATE: Monday, 13 October 2008

 

PART 1

 

Question 1

Which two of the following statements about software development are true? (Select two options)

  1. The larger the scale of the development, the more likely it is that the people involved in designing the system are also involved in coding and testing the system.
  2. Testing should take place at each phase of development.
  3. Maintenance can involve adding extra functionality to the system.
  4. The initial structural model is the final result of the evolution of the implementation model.
  5. A structural model contains object diagrams which illustrate the interactions within the operational system.

 

ANSWERS(Purchase full paper to get all the solution)

C. Maintenance can involve adding extra functionality to the system.

 

E. A structural model contains object diagrams which illustrate the interactions within the operational system.

 

 

Question 2

Consider the following diagram.

Which two of the following statements relating to this diagram are true? (Select two options)

  1. The diagram is an example of a static model.
  2. The diagram is an example of a dynamic model.
  3. From the diagram it can be deduced that the class Form (i.e. the class of form1, form2 and form3) should have an instance variable size.
  4. From the diagram it can be deduced that the method getFormWithFewestPupils() returns a value that represents the name of a form.
  5. A collaboration between userInterface and form2 is illustrated in the diagram.
  6. A collaboration between school and form1 is illustrated in the diagram.

 

Question 3

Which two of the following statements relating to the requirements specification process are true? (Select two options)

  1. The following is an example of a behavioural requirement:

‘The memory requirements of the software should not exceed 15 Mb’

  1. The following is an example of requirements creep:

‘The software should allow the user to view all of their scores as the game progresses’

  1. The following is an example of a constraint that is not a behavioural requirement:

‘The software should be compatible with Windows Vista’

  1. The following is an example of a behavioural requirement: ‘An unauthenticated user must not be allowed to play a game’
  2. The following is an example of a constraint that is not a behavioural requirement:

‘An unauthenticated user must not be allowed to view players’ scores’

 

Question 4

Which two of the following statements about conceptual modelling are true? (Select two options)

  1. A class in a conceptual model should represent a significant category of entities in the system domain.
  2. A significant category of abstract entities in the system domain should always be represented by an abstract class in the conceptual model.
  3. Each attribute identified during conceptual modelling will later be implemented as an instance variable.
  4. Each invariant in the conceptual model corresponds to an invariant in the initial structural model.

Every conceptual model should contain a representation of at least one event in the system domain.

 

Question 5

The following is an extract from a requirements document for a leisure centre’s system.

Each swimming class at the leisure centre is led by two swimming teachers and each teacher leads between one and five swimming classes. Each pupil takes part in just one class, and each class has to contain at least four pupils. Each teacher and each pupil must have a unique membership number.

On the basis of the above information alone, which one of the following class diagrams would be the most appropriate as part of a conceptual model for this system? (Select one option)

 

 

Question 6

The following is an extract from a requirements document for a property management company’s system. The class diagram is intended to form part of a conceptual model for the system.

Extract from requirements document:

Each client of the company is either a tenant, who rents at least one property, or a landlord, who owns at least one property. Landlords may also rent property, though a landlord cannot rent a property they own. The company deals with property of many kinds, including houses and apartments.

On the basis of the above information, which three of the following statements are true? (Select three options)

  1. owns is a derived association.
  2. The class Property should be marked as an abstract class.
  3. The class Client should be marked as an abstract class.
  4. The following is an invariant that is required in addition to the class diagram, as part of the conceptual model:

Each Tenant object must be linked to at least one Property object via rents.

  1. The following is an invariant that is required in addition to the class diagram, as part of the conceptual model:

Each Landlord object must be linked to at least one Property object via owns.

  1. The following is an invariant that is required in addition to the class diagram, as part of the conceptual model:

If a Landlord object aLandlord and a Property object aProperty are linked via owns then aLandlord and aProperty cannot be linked via rents.

 

 

Question 7

Which two of the following statements are true? (Select two options)

  1. Every object-oriented component consists of a single class.
  2. Encapsulation contributes to the ability of a class to form a building block for use in different systems.
  3. Polymorphism contributes to the ability of a class to form a building block for use in different systems.
  4. If a class is encapsulated then the integrity of that class is guaranteed.
  5. The terms data hiding and encapsulation mean the same thing.

 

Question 8

Which three of the following statements about designing software are true? (Select three options)

  1. One way of enabling a system to adapt to future changes is to arrange as far as possible for information required to initiate use cases to be passed into the core system in the form of core objects.
  2. One way of enabling a system to adapt to future changes is to arrange as far as possible for information required to initiate use cases to be passed into the core system in the form of attribute values of core objects.
  3. One way of enabling a system to adapt to future changes is to arrange for a single coordinating object to receive messages that initiate use cases.
  4. One way of enabling a system to adapt to future changes is to arrange for a variety of different core objects to receive messages that initiate use cases.
  5. One way of protecting the integrity of a core system is to grant clients access only to coordinating methods and to methods that get information about core objects.
  6. One way of protecting the integrity of a core system is to grant clients access only to coordinating methods and to methods that change the states of core objects.

 

 

Question 9

Two message answers (message answer 1 and message answer 2) are missing from the sequence diagram in Figure 10. Which one of the following statements correctly describes the missing message answers? (Select one option)

A.

message answer 1:

{table5, table6, table7}

message answer 2:

{(table5, waiter1), (table6, waiter1), (table7, waiter2)}

B.

message answer 1:

{(waiter1, table5), (waiter1, table6), (waiter2, table7)}

message answer 2:

{(waiter1, table5), (waiter1, table6), (waiter2, table7)}

C.

message answer 1:

{(table5, waiter1), (table6, waiter1), (table7, waiter2)} message answer 2:

{(table5, waiter1), (table6, waiter1), (table7, waiter2)}

D.

message answer 1:

{(table5, table6, table7), (waiter1, waiter1, waiter2)} message answer 2:

{(table5, table6, table7), (waiter1, waiter1, waiter2)}

 

 

Question 10

Which one of the following statements could be a correct identification of the walkthrough steps indicated by the notes X, Y and Z in the sequence diagram? (Select one option)

  1. X is Step 1; Y is Step 2; Z is Step 4
  2. X is Step 1; Y is Step 3; Z is Step 4
  3. X is Step 2; Y is Step 3; Z is Step 5
  4. X is Step 1; Y is Step 2; Z is Step 3 
  5. X is Step 1; Y is Step 3; Z is Step 2

 

Question 11

On the basis of the above information, which two of the following statements are true? (Select two options)

  1. A method whose specification begins as follows is needed in the protocol of Restaurant:

Waiter getWaiter()

  1. A method whose specification begins as follows is needed in the protocol of Table:

Collection getWaiter()

  1. A method whose specification begins as follows is needed in the protocol of Table:

Waiter getWaiter()

  1. Step 2 of the walk-through can be achieved by the navigation of hasRestaurants from  RestaurantCompanyCoord to Restaurant.
  2. Step 3 of the walk-through can be achieved by the navigation of serves from Table to Waiter.
  3. Step 3 of the walk-through can be achieved by the navigation of serves from Waiter to Table. 

 

Question 12

Consider the class diagram below for a school administration system and the sequence diagrams (a) and (b) that follow it. Each sequence diagram illustrates a design for the same use case, Remove all Pupils from Form. school is the coordinating object and the coordinating class is SchoolCoord.

Which two of the following statements are true? (Select two options)

  1. The design illustrated by sequence diagram (a) makes SchoolCoord more cohesive than does the design illustrated by sequence diagram (b).
  2. If the design illustrated by sequence diagram (a) is chosen for this use case then the classes Form and Pupil need not be coupled.
  3. The classes Form and Pupil are coupled whichever design is chosen for this use case.
  4. form1 can be described as an information expert for the task of removing all pupils from the form it represents.

  5. school can be described as an information expert for the task of removing all pupils from a form.

 

 

Question 13

Which two of the following statements relating to detailed design are true? (Select two options)

  1. Improving the structure of the system to make it more maintainable is one aim of detailed design.
  2. Enhancing the potential for parts of the system to be reused is one aim of detailed design.
  3. Refactoring the structure of the system in order to extend the system’s behaviour is one aspect of detailed design.
  4. Every utility class should be immutable.
  5. A utility class is a helper class that is only intended to be used within the system for which it was developed.

 

Question 14

Which three of the following statements about implementing and testing object-oriented software are true? (Select three options)

  1. Testing is a not a precise science since when developing a system it may not be clear-cut what tests are appropriate.
  2. In test-driven development, test cases are specified before the implementation model is created.
  3. One benefit of test-driven development is that it helps solve problems with the system as they arise.
  4. Unit testing is normally a form of validation.
  5. System testing is normally a form of verification.
  6. A use case-driven approach to implementation often leads naturally into regression testing.

 

Question 15

Which two of the following statements about implementing object-oriented software are true? (Recall that in M256 the first code iteration is the first stage in implementing a core system.) (Select two options)

  1. The coordinating method for each use case is normally implemented in the first code iteration.
  2. A toString() method for each class is normally implemented in the first code iteration.
  3. Methods that return information about the values of link references are normally implemented in the first code iteration.
  4. Normally, only the dynamic part of the implementation model is used by the developer when adopting a use case-driven approach to implementation.
  5. In a use-case driven approach to implementation, the sequence diagrams for each use case define what methods need to be implemented and how the methods are related.

 

 

Question 16

Which two of the following statements about user interfaces and their design are true? (Select two options)

  1. ‘Extraordinary HCI’ refers to a set of interactive products that have exceptionally good usability.
  2. Just because a widget is easy to see, it does not follow that it has good visibility.
  3. The most appropriate set of design principles to apply will depend in general on the system domain.
  4. A user interface metaphor should typically be independent of users’ mental models.
  5. Not all graphical user interfaces use direct manipulation.

 

Question 17

Which two of the following statements about user interfaces and their design are true? (Select two options)

  1. ‘Design for all’ advocates that all users should be encouraged to participate in user interface design.
  2. Affordance refers to the manipulations that a widget appears to allow.
  3. Design heuristics are typically universally applicable.
  4. There is an international standard which contains a definition of usability suitable for use in HCI.
  5. The NASA TLX tool provides a subjective measure of efficiency

 

 

Question 18

Which two of the following statements about building a graphical user interface (GUI) from a given design sketch for a use case are true? (Select two options)

  1. The GUI implementor is typically concerned more with the details of the core system code than with its Javadoc documentation.
  2. In the communication between the core system and the GUI, the core system usually acts solely as a server.
  3. In the communication between the core system and the GUI, the core system usually acts both as a server and as a client.
  4. It is the GUI implementor’s responsibility to determine what data is required to initialise each component.
  5. It is the GUI implementor’s responsibility to determine what kinds of information should be displayed on each screen.

 

Question 19

Which two of the following statements are true? (Select two options)

  1. A logical architecture is a view of a system in terms of how the different computers involved are connected.
  2. A package diagram illustrates a system in terms of its organisation into software components.
  3. A tiered architecture partitions a system’s hardware elements (processors etc) into a series of layers.
  4. One advantage of tiered architectures is that reuse is made simpler.
  5. One advantage of tiered architectures is that only three components are needed.

 

 

Question 20

  1. The Singleton design pattern describes a solution to the following problem:
    Different objects need to react to changes in another object to which they are otherwise unrelated.
  2. The Façade design pattern describes a solution to the following problem:

     

    Exactly one instance of a class is required.
  3. A design pattern is a detailed design typically applicable only to a specific kind of software system.
  4. A typical feature of open source development is that all of the source code for a project is made publicly available.
  5. A typical feature of open source development is that several people may be working independently on the same component.

 

 

 

 

PART 2

 

Question 21

A chain of hairdressing salons needs a system to record information about the salons, and about the appointments and training sessions held in them in a given month (no other historical or future information about appointments or training sessions needs to be kept by this system). Here is the relevant part of the requirements document for this system.

System domain

Each hairdresser is either a trainee or a trained stylist. Trained stylists are at one of two levels: junior and senior. Each salon employs at least three stylists and up to five trainees. A stylist works in a single salon but a trainee may work in one or more salons.

Each trainee has a mentor, who is one of the stylists at one of the trainee’s salons. A stylist may mentor any number of the trainees working at the same salon. At the beginning of each month at least one individual training session is planned for each trainee during that month, to be led by the trainee’s mentor. This need not take place in one of the trainee’s salons, but can be in any salon.

A client must make an appointment with a specific hairdresser. Both appointments and training sessions last for an hour. A hairdresser may only be involved in one appointment or training session at any given time.

Use cases

Appoint new hairdresser. The administrator supplies the details of the new hairdresser (name, date of birth and address) and informs the system whether the new hairdresser is a trainee or a stylist. The system records this information.

If the new hairdresser is a trainee the administrator identifies the salon(s) in which the trainee will be working, and the stylist working in one of these salons who will mentor the trainee. The new trainee must not cause the trainee limit at any of the salons to be exceeded. The system records this information.

If the new hairdresser is a stylist the administrator identifies the salon in which the stylist will be working, and informs the system whether the stylist is at junior or senior level. The system records this information.

Book appointment. If the client is already known to the system the administrator identifies the client, otherwise the administrator provides the client’s name and phone number. The administrator identifies a hairdresser and provides a date and time for the appointment.

If the hairdresser is already occupied at this date and time, with either another appointment or a training session, then the system informs the administrator of this.

If the hairdresser is free then the system records the appointment with the hairdresser made by the client.

List training sessions . The administrator identifies a salon. For each training session due to be held at that salon in the current month the system lists the date and time of the session along with the names of the trainee and the stylist involved.

 

Here is an incomplete conceptual model with four classes missing.

  1. Copy this incomplete diagram into your answer book. Identify the four missing classes and put their names into the four blank rectangles in your diagram.
  2. Now complete the class diagram you began in (a), and write the class descriptions required for a conceptual model for the system. This should involve the classes in Figure 14 above, along with the classes identified in your solution to part (a), and no other classes.
    Your answer should include:
    1. a complete class diagram;
    2. class descriptions (you may omit comments).

      c. State an invariant that is used in the derivation of a derived association in the conceptual model
       
  3. State in real-world terms a condition that is evident from the requirements document and that should be modelled by adding an invariant different to that in (c) above to the conceptual model.
     

 

 

Question 22

The following is an extract from a structural model for a system for a company that hires out cars on a daily basis. It is incomplete but contains all the information required by this question.

  1. Draw an object diagram showing the relevant objects and links after the use case Make Booking for Existing Customer has completed, with the identified object being customer5 and the date being 05/01/09. Your diagram should depict carHire and all Car, Booking and Customer objects, but may omit any attribute-value pairs that are unchanged by the use case.
  1. Complete the walk-through and sequence diagram that are given below for this scenario, providing the following in your answer book:
    1. the complete walk-through
    2. the complete sequence diagram.

Note the following:

  • As well as filling in the blanks in the walk-through you are expected to complete it by adding one or more remaining steps at the end.
  • Your sequence diagram should illustrate a design in which the coordinating object is directly responsible for initiating the creation of the new Booking object. The new Booking object should then have responsibility for managing the creation of new links, with any messages required for link creation being sent from within the Booking class constructor.
  • You need not indicate on your sequence diagram where walk-through steps 1 to 8 take place, but you should indicate where any additional steps that you add to the walk-through take place.
  • The sequence diagram may require quite a bit of horizontal, as well as vertical space, so you may wish to draw it landscape-fashion in your answer book. You may find it helpful to draw a rough sketch to guide you before setting out your final sequence diagram.

 

 

 

Question 23

The following is an extract from an implementation model for an administration system for a hotel. It is incomplete but contains all the information required by this question. It consists of a class diagram, class descriptions, and some invariants. The system uses the class Name from the package m256people as specified on pages 14 and 15 of the M256 Handbook, as well as the class M256Date.

You may want to skim through this model first to get an overview. Refer to it as required when you are answering the question.

(a) Write code for the method getNumberOfReservations() of the class Room, including a Javadoc method comment.

Here is a description of a use case of this system, List Rooms and Guests for Date.

List Rooms and Guests for Date. The receptionist provides a date. For each reservation on that date the system displays the corresponding room number and guest name.

The following object diagram, walk-through and sequence diagram form a dynamic model for this use case. hotel is the coordinating object.

 

Purchase full paper by adding to cart

 

Last updated: Sep 02, 2021 01:10 PM

Can't find a resource? Get in touch

AcademicianHelp

Your one-stop website for academic resources, tutoring, writing, editing, study abroad application, cv writing & proofreading needs.

Get Quote
TOP