2008 Flashcards

1
Q

A good software system is one that meets its users’ needs. List three characteristics that such a system should possess.

A

A good software system should be useful, usable, reliable, flexible, affordable and available [any three of these].

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

If more people are added to a software development team, what effect will it have on communication?

A

If more people are added to a software development team, then the number of channels of communication will increase. This will mean that each person will spend more time communicating with other team members, adding extra overhead.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the difference between a functional requirement and a non-functional requirement?

A

A functional requirement is one that specifies an action the software must perform, e.g. check, calculate, record, retrieve etc., whereas a non-functional requirement specifies a quality that the software must possess.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the advantages of using a standard template, such as the Volere template, for requirements capture?

A

Using a standard template for requirements capture:

  • saves wasting time repeatedly making decisions about what to record;
  • ensures that nothing important is left out;
  • assists communication between developers;
  • allows projects to be compared and requirements reused in some cases.

[any three of these]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the benefits of prototyping? Who should test a prototype?

A

The benefits of prototyping include:

  • it helps with the design of the user interface;
  • it gets the users involved and is a good way of capturing and refining requirements;
  • it help minimise misunderstandings between the developer and the users;
  • it may allow early detection of possible problems, before things have gone too far, at a relatively low cost; [any three benefits] The prototype should be tested by ‘real’ users, that is, those who will be using the software on a day-to-day basis.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Can the association between Doctor and Patient be derived from those between Doctor and Clinic, and Clinic and Patient? Explain your answer.

A

No. Several doctors can be linked to a given clinic, and any one of these might be the one that is linked to a given patient. Therefore, it is not generally possible to work out which doctor is linked to which patient from the links between doctors and clinics and between clinics and patients.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

By considering a loop from Clinic or Patient, formed by associations, find an invariant that should apply to the model. Express the invariant either in OCL in the context of Clinic or Patient, or using an unambiguous description in English.

A

The unambiguous English description is shown as a comment in the OCL specifications.

context Patient inv:

  • -The set of Doctor instances of the Clinic a Patient is linked to includes the Doctor of that Patient.
    self. clinic.doctor -> includes(self.doctor)

Alternatively, in Clinic,
context Clinic inv:
– The set of Patient instances of a Clinic is the same as the collection of
Patient instances of all Doctors of that Clinic.
self.patient = self.doctor.patient

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Redraw the classes Clinic and Patient, and the association between them, to show the fact that patientRef is a unique identifier by using a qualified association.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
This question refers to the class model in Figure 1.
Suppose we want to implement a use case printPrescription(Patient aPatient) and we have decided that the initial message printPrescription(joanna) will be sent to the Clinic from the user interface.
Draw a sequence diagram showing a fork solution, inventing suitable names for the methods required.
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

In a shared hallway, the light is operated by a press-button switch. Initially, the light is off. Whenever the button is pressed, the light is switched on. As an energy saving measure the light only remains on for 2 minutes after being switched on, then switches itself off again automatically.
Draw a statechart diagram for the hallway light.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Would an object of class A be substitutable for one of class X, without undermining the subtyping relationship? Briefly justify your answer.

A
No. Class A redefines the sum method to return a value rounded to the nearest whole number, thus sacrificing some accuracy.
This will break the contract with a client that is expecting an object of class X and may be relying on the full accuracy being retained.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Would an object of class B be substitutable for one of class X, without undermining the subtyping relationship? Briefly justify your answer.

A

Yes. Class B adds a method product but leaves the existing sum method unaltered, so that a client expecting an object of class X will be not be affected if an object of class B is used in its place.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

State two advantages of separating presentation logic from domain logic.

A

The advantages of separating presentation logic from domain logic are:
• the business and presentation logic can be tested separately;
• changes to the implementation of the business logic will not affect presentation logic;
• the presentation logic can be varied independently of the business logic.

[any two of these]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

In Figure 3, which layer would you expect to be responsible for checking the validity of user input? Briefly explain your choice.

A

The presentation layer. The validity of input is a user interface issue rather than a business logic issue.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Compare the two code samples below (A and B in Figure 4) using first the lines-of-code (LOC) metric and then the cyclomatic-complexity metric. Which extract do you conclude is the more complex?
Note: we advise that when calculating the cyclomatic complexity, you show your working.

A

Code sample A:
LOC 5 (6 if the comment is counted)
Cyclomatic complexity: 1 straight-through + 1 for + 1 if + 1 if = 4
Code sample B:
LOC 5 (6 if the comment is counted)
Cyclomatic complexity: 1 straight-through + 1 for = 2
Although the LOC is the same for both samples, A has the higher cyclomatic complexity, suggesting that it is more complex.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

In software development, what problem does configuration management aim to solve?

A

Configuration management aims to keep track of successive versions of each item and the dependencies between them. This avoids developers wasting time working with the wrong versions, as well as ensuring that the items comprising each release are a consistent set of versions that will work together correctly.

17
Q

In the context of configuration management, what is the difference between a version and a variant?

A

A version is one of a series of reviews of the same item. A variant is a variation of a configuration item, but differing in some well defined way, and can have versions itself.

18
Q

Give one advantage and one disadvantage of an open-plan office as a working environment for software developers.

A

An advantage of an open-plan office is that peer communication is easier and more immediate. A disadvantage of an open-plan office is that developers may find it distracting and experience difficulty in completing tasks, because of frequent interruptions.