Premium Resources

We know the secret of your success

M256/S Software development with Java Undergraduate Level Course Examination 2007

$39.00

PAPER TITLE: SOFTWARE DEVELOPMENT WITH JAVA

DATE: Wednesday 17 October 2007

 

Part 1

Question 1

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

  1. Software development is the process of getting from a customer’s needs to operational software that meets those needs.
  2. Maintenance of a system is solely concerned with requirements creep
  3. A larger software development team demands less project planning since the team members can work independently.
  4. In software development the term requirements refers to what is expected of a system.
  5. In software development the term requirements refers to the intended financial package for the developers involved in a project.

 

ANSWERS(Purchase full paper to get all the solution)

A. Software development is the process of getting from a customer’s needs to operational software that meets those needs.

D. In software development the term requirements refers to what is expected of a system.

 

Question 2

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

  1. A project manager’s main role is to assess the feasibility of a proposed system.
  2. A requirements analyst is involved in eliciting and analysing the requirements of a proposed system.
  3. Programmers should never be involved in testing code as this is the sole responsibility of software testers.
  4. An IDE (integrated development environment) is a software tool which facilitates many of the tasks associated with writing and running programs.
  5. An IDE (integrated development environment) is the term used by developers to refer to a critical insight that leads to a solution to a design problem.

 

Question 3

Which two of the following statements about developing object-oriented software are true? (Select two options)

  1. The software developer should avoid using objects that correspond to real-world entities.
  2. A link in an object diagram illustrates the connection between an object and its corresponding real-world entity.
  3. The software developer should aim to design a system so that its state is independent of the states of its objects.
  4. It is not possible to design a system so that its state is independent of the states of its objects.
  5. An object diagram can be used to illustrate the state of a system at a particular point in time.

 

Question 4

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

  1. The main goal of requirements analysis is to make the requirements document as general as possible in order to reduce constraints on the developers.
  2. A use case is a concise description of a specific task that a system must be able to perform.
  3. The term behavioural requirement refers to a condition that is placed on the professional conduct of any stakeholder.
  4. Acceptance testing is the process of assessing the psychological impact of a system on its users.
  5. In the context of a proposed software system, a stakeholder is anyone who has an interest in the system.

 

 

Question 6

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

  1. The multiplicity of the isStaffMemberOf association at the Department end should be 1.
  2. The multiplicity of the isStaffMemberOf association at the Department end should be 0..1.
  3. The multiplicity of the isStaffMemberOf association at the Department end should be 1..20.
  4. The multiplicity of the isStaffMemberOf association at the Lecturer end should be 1.
  5. The multiplicity of the isStaffMemberOf association at the Lecturer end should be 1..20.
  6. The multiplicity of the isStaffMemberOf association at the Lecturer end should be 20.

 

Question 7

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

  1. mentors is a derived association.
  2. It is possible for a lecturer to be mentored by two other lecturers.
  3. It is possible for a lecturer to be mentored by three other lecturers.
  4. It is possible for a lecturer to mentor no other lecturers.
  5. The following is an invariant that is required in addition to the class diagram, as part of the conceptual model:

If aLecturer and bLecturer are Lecturer objects that are linked to the same Department object then aLecturer and bLecturer must be linked to each other.

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

If aLecturer and bLecturer are Lecturer objects that are linked to each other then aLecturer and bLecturer must each be

linked to the same Department object.

 

 

Question 8

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

  1. The Javadoc documentation for a method typically describes its post-conditions but not its pre-conditions.
  2. The specification of a method should include a description of the method’s pre-conditions, but not its post-conditions.
  3. The specification of a component should include a description of any other components it depends on.
  4. Coupling is a measure of how strongly related and focused the responsibilities of a component are.
  5. High cohesion is considered desirable.

 

Question 9

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

  1. To prevent a client from improperly accessing and manipulating the state of an object referenced by an instance variable, it is sufficient to give the instance variable private accessibility.
  2. When a class member has private accessibility, it can only be accessed from within that class.
  3. A copy constructor of a class takes as argument an object of that class, and creates and returns a defensive copy of that object.
  4. A defensive copy of an object is a distinct object of a different class with the same state.
  5. All the methods in a coordinating class should have package access.

 

 

Question 10

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

  1. Steps 2 and 4 of the walk-through are carried out by hospital.
  2. Steps 2 and 4 of the walk-through are carried out by ward3.
  3. Step 4 of the walk-through is carried out by each Patient object in turn.
  4. A method with specification beginning as follows is needed in the protocol of Ward:

boolean isTreated()

  1. A method with specification beginning as follows is needed in the protocol of Patient:

Collection isTreated()

  1. A method with specification beginning as follows is needed in the protocol of Patient:

boolean isTreated()

 

Question 11

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

  1. The walk-through requires hasWards to be navigated from HospCoord to

Ward.

  1. Step 1 of the walk-through can be achieved if isOn is navigated from Ward to Patient.
  2. Step 1 of the walk-through can be achieved if isOn is navigated from

Patient to Ward.

  1. Step 3 of the walk-through can be achieved if hasTreated is navigated from Doctor to Patient.
  2. Step 3 of the walk-through can be achieved if hasTreated is navigated from Patient to Doctor.

 

Question 12

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

  1. patient8 is linked to a Doctor object.
  2. ward3 is linked to exactly two Patient objects.
  3. ward3 is linked to exactly three Patient objects.
  4. An isTreated() message answers true if its receiver is linked to a

Patient object.

  1. An isTreated() message answers false if its receiver is not linked to a Doctor object.

 

Question 13

Consider the class diagram and the sequence diagrams (a) and (b) that follow it.

Which one of the following statements is true? (Select one option)

  1. Sequence diagram (a) does not require a link from dvd17 to film2.
  2. Sequence diagram (b) does not require a link from dvd17 to film2.
  3. Sequence diagram (a) is an example of a fork design.
  4. Sequence diagram (b) is an example of a fork design.
  5. Sequence diagram (a) is an example of a cascade design.

 

Question 14

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

  1. If a toString() method is specified for a class then it should be consistent with any equals() method specified for that class.
  2. An enumerated type may be used to implement an attribute which has a fixed number of possible values.
  3. A link reference should always be implemented using an enumerated type.
  4. A link reference may be implemented using a collection.
  5. Any class that is used more than once in the system that is being developed is termed a utility class.

 

Question 15

Which three of the following statements about implementation and testing are true? (Select three options)

  1. Testing should involve checking that the code does not do anything extra that it is not supposed to.
  2. Testing should involve checking that all models created during development are consistent with each other.
  3. The goal of the testing process is to prove that there are no bugs in the code.
  4. The goal of unit testing is to test the different possible values an attribute can take.
  5. A test at a boundary involves checking that the system’s components integrate properly.
  6. Dynamic models such as walk-throughs and sequence diagrams guide the developer in coding methods.

 

Question 16

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

  1. A dialogue box is a type of window in which the user is presented with information but cannot enter any information.
  2. A slider may be used to allow the user to choose a single value from a continuous range of values.
  3. Affordanc is the degree of usability that a client can afford for their system, given the constraints on development time and cost.
  4. One aspect of direct manipulation is that small operations can be used to incrementally cause an overall big effect.
  5. For expert users, a graphical user interface is always easier to use than a command-line interface

 

Question 17

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

  1. In the context of user interfaces, the term visibility refers to the idea that a widget should not be concealed by other elements of the user interface.
  2. Include clearly marked exits is an example of a design heuristic.
  3. All modern text-formatting systems are based on the WYSIWYG idea.
  4. In the context of user interfaces, the term polymorphism refers to the fact that a button can take on many shapes or forms.
  5. In the context of user interfaces, efficiency can be measured in terms of the time taken to complete a task.

 

Question 18

Which two of the following statements about building graphical user interfaces (GUIs)

are true? (Select two options)

  1. When implementing a Java GUI, one visual component may be nested inside another.
  2. The core system must have a reference to some object in the GUI.
  3. Event handling code enables a user to interact directly with the core system, without involving the user interface.
  4. In planning the implementation of a Java GUI the implementer needs to decide which components should be used to implement the widgets shown in the GUI design.
  5. Acceptance tests are normally carried out before the GUI is implemented.

 

Question 19

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

  1. In a tiered architecture each component must be deployed on a different computer.
  2. A package diagram can be used for recording the associations between classes inside a single component.
  3. The concept of cohesion can help to decide where to locate responsibility for managing concurrent access.
  4. All design patterns are concerned with how objects are created within a system.
  5. The Singleton pattern describes a design in which a new instance of a class is created only if an instance of the class does not already exist.

 

Question 20

Which one of the following statements is true? (Select one option)

  1. A system is described as persistent if it makes a continuous effort to obtain the information required from the user.
  2. The term eXtreme Programming (XP) refers to the activities undertaken in the latter stages of software development when a project is behind schedule.
  3. EXtreme Programming (XP) is an example of an agile development method.
  4. The term agile software development refers to the development of software that needs to quickly adapt to changing user requirements when the software is in operation.

 

Part 2

 

Question 21 [20 marks]

A consortium of regional airlines needs a system to record information about the regional airports that support these airlines, and the flights operated by the airlines which depart and arrive at the airports in a single week (no other historical or future information needs to be kept by this system). Here is the relevant part of the requirements document for this system.

System domain

Each regional airport is identified by its location and provides support for three or more regional airlines. A regional airline may chose not to be supported by a particular airport, in which case its flights cannot depart or arrive there, but each airline needs the support of a minimum of two airports.

Each airport has up to 200 flights departing from it and up to 200 flights arriving at it each week. Each flight is operated by a single airline and has an identifying number, a date, a take-off time and a landing time. Each flight uses exactly one plane and is a direct short -haul flight completed in the same day. A flight is commanded by a pilot who must be an employee of the airline operating the flight. A pilot may not be employed by more than one airline. Regulations say that a pilot may not command more than

40 flights in a week. A flight cannot have more passengers than the maximum seating capacity of its plane (the capacity varies depending on the plane).

Use cases

Record a new flight. The airline administrator supplies the details of the new flight (identifying number, date (in the current week), take-off time and landing time) and identifies the following:

  • the departure and arrival airports (the new flight must not cause the weekly quota of departing flights at the departure airport or the weekly quota of arriving flights at the arrival airport to be exceeded);
  • the pilot commanding the flight (the new flight must not cause the pilot’s weekly quota of flights to be exceeded);
  • the airline operating the flight (the airline must employ the pilot and be supported by both the departure and arrival airports);
  • the plane used.

The system records the new flight.

Record new passenger. The airline administrator identifies a flight and supplies the new passenger’s name. If an additional passenger would cause the capacity of the flight’s plane to be exceeded, the administrator is informed of this fact. Otherwise, the system records the passenger’s name and that the passenger is on the flight.

List departing flights. The airline administrator identifies an airport. The system displays the flight identifiers, dates and take-off times of all flights departing from the airport that week, as well as the name of the airline operating each flight and the name of the pilot commanding the flight.

Here is an incomplete conceptual model with two classes missing.

(a) Copy this incomplete diagram into your answer book. Identify the two missing classes and put their names into the two blank rectangles in your diagram.

 

(b) 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 7 above, along with the classes identified in your solution to part (a), and no other classes.

Your answer should include:

(i)   a complete class diagram;

(ii)   class descriptions (you may omit comments).

 

(c) State an invariant that reflects the fact that a pilot may only command a flight if he or she is an employee of the airline operating the flight.

(d) State a real-world constraint evident from the requirements document that should be modelled by adding an invariant to the conceptual model. The constraint should be different from that in (c) above and should not relate to the uniqueness of an attribute value.

 

 

 

Question 22 [20 marks]

The following class diagram is a part of the structural model for a shop system.

ShopCoord is the coordinating class.

The following is a description of a use case for this system called Transfer Sales Assistant.

The user identifies a sales assistant and the department to which the sales assistant is to be transferred. The system records that the sales assistant now works in the given department and no longer works in the one that he or she previously worked in.

The object diagram below shows the relevant objects and links for a particular scenario of the use case, before the use case is initiated.

  1. Draw an object diagram showing the relevant objects and links after the use case has completed, with the identified objects being salesAssistant17 and department4.
     
  2. Write out part of a specification for the coordinating method as follows. Using transfer for the name of the method, give the method header i.e. the return type, method name and argument(s) and their type(s).
     
  3. Complete the walk-through and sequence diagram that are given below for this scenario, setting out the following in your answer book:
    (i) the complete walk-through
    (ii) the complete sequence diagram
    You are not required to label the sequence diagram with step numbers.

  4. Suppose that as a result of a change in the requirements, the multiplicity of the worksIn association at the SalesAssistant end is changed to 0..6, as shown in the following class diagram.

In addition the description of the Transfer Sales Assistant use case is changed to the following.

The user identifies a sales assistant and the department to which the sales assistant is to be transferred. This department must have fewer than six sales assistants currently working in it. The system records that the sales assistant now works in the given department and no longer works in the one that he or she previously worked in.

State whether these changes will require the coordinating method that you specified in (b) to have a pre-condition (in which case, state the pre-condition) or a change to its post-condition (in which case describe the change).

 

 

Question 23 [20 marks]

The following is an extract from a structural model for a system called the Garage System. It is incomplete but contains all the information you need to answer this question. It consists of a class diagram and class descriptions. The class diagram does not include a coordinating class. The class descriptions omit some irrelevant attribute, link and protocol information.

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

  1. In this part of the question you will consider the specification of a class, Address, to represent addresses of buildings (houses, offices etc). In the Garage System this will be used in several places: for example, as the type of the instance variable address of the class Garage, as shown in the class descriptions above.
    i. Why might the
    Address class be described as a utility class?

 

ii. Two addresses are usually considered to be the same if their number and postcode are the same. Specify a method for the Address class that will enable this concept of equality to be applied to Address objects. (Note that you are not required to write any code.)

iii. For each attribute of Address given in the specification above, state whether it would be appropriate to equip the Address class with a setter method for the corresponding instance variable. Give a brief justification in each case.

 

  1. Refactoring the designs for the Garage System, based on the structural model above, could lead to the specification of an additional class which represents features that are common to certain entities represented in the system.
    Write down the specification of this class. Note that you should not add any additional features to this class; just specify those which can be deduced from the given model.

     
  2. The description of a use case, Get Owner’s Total, is as follows:
             The administrator identifies an owner. The system displays the total of all invoice amounts for that owner.
    The dynamic model below consists of a walk-through and sequence diagram for a particular scenario of this use case, on the basis that the attribute total of Owner will not be implemented as an instance variable but that its values will instead be derived using the following invariant:
            For each Owner object, its total attribute value is equal to the sum of the amount attribute values of all
            the
    Invoice objects to which the Owner object is linked.

     

On the basis of the above dynamic model write code for the method getTotal()of the class Owner.

 

 

Question 24 [20 marks]

  1. 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 is intended to allow a user to choose to edit the settings either for central heating or for hot water. For each of these options, the user should choose to edit the settings either for weekdays or for 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 weekdays and weekend four corresponding times are displayed: two ti

 

 

 

 

Purchase full paper by adding to cart

 

 

 

 

 

 

Last updated: Sep 02, 2021 01:11 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