not complete Flashcards

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

(a) State two characteristics that a good software system should possess.

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

Briefly explain the difference between the waterfall model of software
development and an iterative approach, giving one advantage of iteration.

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

Why is requirements documentation important?

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

Suggest one reason why requirements may evolve.

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

Consider the following description of a non-functional requirement.
• The portable data recorder shall operate in high-temperature
conditions.
(i) What category of non-functional requirement is it?
(ii) Suggest a fit criterion that could be suitable for this for this requirement.

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

The diagram includes two activities which can be performed concurrently.
Say which activities these are and explain how the concurrency is indicated
in the diagram.

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

Can both, standard topping and special topping be added to a pizza?
Explain your answer.

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

In an activity diagram what event triggers the transition from one activity to
the next?
(

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

According to Figure 2
(i) Is it possible to find out all the treatments types a patient has an
appointment for? Briefly explain your answer.
(ii) Can a patient have an appointment for the same treatment type more
than once? Briefly explain your answer.

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

Using OCL write an invariant, starting from Appointment, to express the rule
that an appointment must be with the patient’s own dentist.

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

This question refers to the class diagram fragment in Figure 2 above.
Imagine we want to implement an operation with following specification
context Dentist::cancelAppointment(appointment : Appointment)
post:
– appointment will no longer be linked to the Dentist, Patient and
TreatmentType for which it was made.

(a) Explain the meaning of the cross × on the lifeline of a4.

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

This question refers to the class diagram fragment in Figure 2 above.
Imagine we want to implement an operation with following specification
context Dentist::cancelAppointment(appointment : Appointment)
post:
– appointment will no longer be linked to the Dentist, Patient and
TreatmentType for which it was made.

(b) Draw a pair of object diagrams, before and after, to illustrate the effect of the
operation.

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

Is the interaction shown in Figure 3 consistent with the Law of Demeter?
Explain your answer.

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

Give two benefits of using statechart diagrams in software development.

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

Suppose you require a mobile phone contract which offers a minimum of
300 inclusive minutes of calls and 200 inclusive texts per month. You are not
willing to accept a contract lasting longer than 1 year.
You are offered three deals, all the same price per month, as shown in
Table 1 below.

Say which of the deals A, B or C, will meet your requirements and which will
not, justifying your answer in each case.

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

(b) Suppose Design by Contract (DbC) is being used.
(i) If the precondition of a method is met but the postcondition is not met,
who is at fault, client or supplier? Briefly justify your answer.
(ii) If the precondition of a method is not met and the postcondition is not
met, who is at fault, client or supplier? Briefly justify your answer.

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

In software development, what is meant by a design pattern?

A
20
Q

Speed Converter is a small program for converting the speed of a boat or
ship from knots to kilometres per hour (km/h) and vice versa. The user
interface of the program is shown in Figure 5 below.
Figure 5
When the user enters a value in either text box and presses the Return key
(also called the Enter key) the program does the conversion and displays
the result in the other text box.
Explain brief how the Model-View-Controller (MVC) pattern can be applied
to the Speed Converter program, saying what represents the model, what
represents the view and what represents the controller.

A
21
Q

One of the advantages of the MVC pattern is that it separates the
presentation from the model, allowing multiple presentations to be used with
the same model. This flexibility allows the design to cater for different
situations and types of user.
Outline very briefly how the Factory method pattern would be useful in this
regard and what the advantage of using it would be. You are not required to
draw any diagrams.

A
22
Q

Calculate the cyclomatic complexity of the code extract in Table 2 below,
Show briefly how you arrived at your answer.

A
23
Q

(b) Can the cyclomatic complexity metric be used effectively for the following
purposes? Briefly justify your answer in each case.
(i) To measure the complexity of an entire class.
(ii) To measure the complexity of an entire program.

A
24
Q

Describe briefly how the number of lines of code (LOC) required for a
software project can be estimated by starting from the use case and class
models and applying function point analysis (FPA). You do not need to
provide any actual numbers, only an outline of the procedure used.

A
25
Q

In software development what is meant by a deliverable and how do
deliverables relate to project scheduling?

A
26
Q

Imagine you are the manager of a software development project and you
are recruiting engineers to work on the project. Suggest two qualities you
would look for in the engineers you recruit.

A
27
Q

What technique is normally used to manage the complexity of a software
project?

A
28
Q

Explain what a legacy system is and how it is likely to be related to flexibility
and affordability.

A
29
Q

Identify the stakeholders for a system to book appointments with a doctor.

A
30
Q

Consider the following description of a non-functional requirement.
The product shall be usable at all normal temperatures.
(i) What category of non-functional requirement is it?
(ii) At present the requirement is loosely worded. Say what should be done
to make it more precise and give a suitable example to help explain
your answer.

A
31
Q

For each of the following say how it could be modelled in UML.
 A business process
 A business rule.

A
32
Q

What type of requirements do use case diagrams capture?

A
33
Q

Give two ways, apart from capturing requirements, in which use case
diagrams can help during software development.

A
34
Q

(a) Explain the meaning of multiplicities at each end of the two associations
between Module and Developer.

A
35
Q
Using OCL write down an invariant which expresses the constraint that the
lead developer for a module must be one of the developers assigned to that
module.
A
36
Q

(a) Suggest a suitable precondition for this use case.

A
37
Q
(b) Write a specification for the corresponding operation addDeveloper in the
class Project.
A
38
Q

Is the design of Figure 2 consistent with the Law of Demeter? Explain your
answer.

A
39
Q

A temperature alarm system operates as follows.
Initially the system is on but not sounding the alarm.
 If the test button is pressed the system goes into test mode which sounds
the alarm for 10 seconds, or until the reset button is pressed, and then
returns to on.
 If the temperature rises above 60° C then whatever its current state the
system goes into warning mode, and sounds the alarm continuously until
the reset button is pressed, when it returns to on
Draw a statechart diagram to show the states the alarm can be in and the
transitions between them.

A
40
Q

What type of event does each of the following represent? Briefly explain
your answers.
(i) A user submits their username and password to a server and waits to
be logged in.
(ii) A user is sent a notification when they have a new email message.

A
41
Q

Suppose there is a requirement to search a file of up to 100 MB and locate a
particular string within 75 milliseconds if it is present in the file.
Two components are available, each of which searches a file for a given string.
Component A can accept a file which must not exceed 50 MB and will
perform the search in at most 50 milliseconds.
Component B can accept a file of up to 150 MB and will perform the search
in at most 100 milliseconds.
For each component, A and B, say whether or not it meets the requirements,
explaining your reasoning.

A
42
Q

What are the advantages to a client of delegating object creation to a
factory, rather than the client creating objects directly itself?

A
43
Q

Click counter is a simple app that counts button presses (Figure 3)
Figure 3 Click counter
This is an example of the Model–View–Controller (MVC) pattern.
(i) Say what the controller is in this example.
(1 mark)
(ii) Briefly explain how using the MVC pattern improves flexibility.
(1 mark)

A
44
Q

(a) Calculate the cyclomatic-complexity metric of the code excerpt below,
showing how you arrived at your answer.
for (int i = anArray.len – 1; i > 1; i–)

{
if (anArray[i] return false;}
return true;

A
45
Q
One way to assess the complexity of a class is to add together the value of
the cyclomatic-complexity metric for each of its methods and constructors, to
give the weighted-methods-per-class (WMPC) metric.
Explain whether we can assess the complexity of an entire system by simply
adding the WMPC for all classes it includes.
A
46
Q

One technique for estimating the resources required for a project is
estimation by work breakdown. Briefly outline what this involves.

A
47
Q

Give an example of an action which would be legally classified as computer
misuse.

A