Practice #1 Flashcards

1
Q

List three characteristics a good software system should possess

A

should be useful, usable, reliable, flexible, affordable and available (any three from this list)

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

Give two ways in which agile software development can help achieve a good software system

A

Software should be capable of adapting to change in requirements, helping to achieve a flexible and useful system.

software should be delivered on time helping to achieve an available system

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, e.g. usability, reliability, maintainability etc.

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

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?

A

The benefits of prototyping include
- helps with the design of UI
- gets users involved and good way to capture refine requirements;
- helps minimise misunderstandings between the developer and the users;
- may allow early detection of possible problems, before things have gone too far, and at a relatively low cost;
(any three benefits)

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

Who should test a prototype?

A

The prototype should be tested by ‘real’ users – 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
7
Q

What is the relationship between stakeholders and architectural views?

A

An architectural view represents the concerns of a set of stakeholder groups

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

What is reused in a framework?

A

A framework reuses an architecture together with code for components that can slot into that architecture.

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

How are the Model-view-controller (MVC) and Observer software patterns related?

A

In MVC the view needs to be kept updated when the state of the model changes. This can be achieved by using the Observer pattern, with the model as the subject and the view as the observer.

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

Suggest one advantage of developing software by plugging together off-the-shelf components.

A

Any of these Advantages :

  • Should be cheaper
  • Allows quicker development
  • Behaviour of well-tried components will be well understood
  • Components are replaceable with other components that have to same interface
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Suggest one disadvantage of developing software by plugging together off-the-shelf components.

A

Any of these Disadvantages:

  • We will be restricted to the capabilities of the components
  • Some additional software is likely to be needed
  • Adapters may be needed if interfaces are incompatible
  • Creating a system from pluggable components may be more difficult than it sounds.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the difference between a provided and a required interface?

A

A provided interface describes the operations a component provides to other components. A required interface describes the operations a component requires from other components.

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

The usual response measures for a performance scenario are latency, deadline, throughput, jitter, miss rate and data loss. Choose two of these that would be most appropriate in the case of an internet radio service, and briefly explain your answer

A

Any two of these:

  • Latency will affect how quickly a channel can start playing
  • Throughput must be sufficient to stream the service to the user
  • Data loss must be low otherwise some part of the broadcast will be missed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

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

int count = 0;
for (int i = 0; i 0) && (inputArray[i]

A
The cyclomatic complexity is 
1 (straight through) 
\+ 1 (for) 
\+ 1 (if) 
\+ 1 (&&) 
=4.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

In test driven development what steps do you need to carry out before you write the code that implements an operation

A

Decide on code increment; decide on test; write the test, run the test assuming failure; and only then write the code

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

Present two situations in which the use of agile development would not be recommended or would be difficult to implement.

A

Agile is not recommended or is difficult to implement in the following situations. (any 2 of these)

  • Heavily regulated environment – agile is not amenable to heavy regulated documentation
  • Predictability is more important than flexibility – agile values flexibility rather than predictability
  • Large software development with distributed teams – difficulty to scale has been a constant criticism of agile; distributed teams put a heavy burden on communication which so central to agile
  • Requirements are well defined and unlikely to change
  • Customer is distant –agile demands close involvement of customer
17
Q

Present one situation in which agile developments would be easy to implement.

A

Agile is easy to implement in the following situations
- Requirements are constantly changing – agile deals with well with change
- Developers and users can communicate regularly – agile demands close involvement of developers and users
- The team is small, so that everyone can take part in a single stand-up meeting.
- Team members are disciplined enough not to use “agile” as an excuse for cowboy coding (writing code according to their own rules disregarding what has been agreed by team).
- Developers like being empowered.
(any two of these)

18
Q

The Acme Booking System
The Acme Garden Equipment company hire out a range of gardening equipment, at a daily rate. Acme operates at a number of branches in different parts of the country.
A customer wishing to hire an item must make a reservation, specifying the type of equipment required, the hire start and finish dates, and details of a valid credit
or debit card to which the hire fee is to be charged. The customer may visit one of Acme’s branches to do this, or may communicate with a branch by telephone or email. Subject to availability, the reservation is then recorded by one of Acme’s sales assistants and the customer is issued with a reservation number.
The customer is then responsible for collecting the equipment from the branch on the day their hire period begins and returning it to the same location by 5 p.m. on
the last day of the hire period. When the customer takes the item a sales assistant books it out to them and when the item is returned an assistant books it back in. Late returns incur an extra charge of one day’s hire fee.
Customers wishing to cancel a reservation can do so without charge providing the cancellation is made at least 48 hours before the hire is due to begin,
otherwise they pay one day’s hire fee. A customer who wants to extend a rental can do so at the standard daily rate, subject to availability. At present each of Acme’s branches has its own standalone computer system for
recording reservations and the hire and return of equipment. This is not ideal, for example a customer cannot currently make a reservation at one branch but
collect the equipment from another. The company therefore wishes to introduce a new system that will integrate reservations across all the branches. At the same time Acme want to add a facility for customers to make, extend and cancel reservations over the internet, while still retaining the existing methods of
communication by customers.

Consider the new system to be introduced.

  1. List the actors for the new system
  2. Identify the use cases for the new system
A
  1. Customer, SalesAssistant

2. make reservation, cancel reservation, book out item, record extra charge payment, book in item, extend rental

19
Q

Table 2 below is an incomplete textual description of the use case cancel reservation for the proposed system. At present the main success scenario is missing.
(i) Write the main success scenario for this use case. You do not need to consider any extensions.
Table 2
The cancel reservation use case
Identifier and name: UC2 cancel reservation
Initiator: Customer or Sales Assistant
Goal: The reservation a customer has made is cancelled
Precondition: To be completed
Postcondition: To be completed
Assumptions: The initiator is a Customer or Sales Assistant
Extensions None

A

Identifier and name UC2 cancel reservation
Initiator = Customer or Sales Assistant
Goal = The reservation a customer has made is cancelled
Precondition = A reservation exists with the given reservation number
Postcondition = The reservation will have been cancelled, thereserved item will now be available again between the start and finish dates, and a charge of one day’s hire fee will have been made if the cancellation was made within 48 hours of the start of the rental period.

Assumptions = The initiator is a Customer or Sales Assistant

20
Q

Table 2 below is an incomplete textual description of the use case cancel reservation for the proposed system. At present the main success scenario is missing.
(i) Write the main success scenario for this use case. You do not need to consider any extensions.
Table 2
The cancel reservation use case
Identifier and name: UC2 cancel reservation
Initiator: Customer or Sales Assistant
Goal: The reservation a customer has made is cancelled
Assumptions: The initiator is a Customer or Sales Assistant
Main success scenario: TO BE COMPLETED

A

Main success scenario
1 The customer or sales assistant requests cancellation of a reservation.
2 The customer or sales assistant enters the reservation number.
3 The system retrieves the corresponding reservation.
4 The system frees the equipment between the start and finish dates.
5 The customer or sales assistant confirms cancellation.
6 If the cancellation is within 48 hours of the start date the system charges one day’s fee to the customer’s credit card.
7 The reservation is cancelled and the system informs the initiator of the cancellation.
Extensions None

21
Q

Pick one step from your scenario and identify the corresponding software requirement(s) and associated fit criteria.

A

The customer or sales assistant enters the reservation number.
SFR: UC2, Step 2
Description: The system shall obtain a reservation number
Fit criterion: A valid number shall be accepted

22
Q

Invent one example of a usability requirement and one example of a performance requirement that might be relevant to the scenario in part
(i).
For each of these requirements provide a suitable fit criterion that could apply to it.

A

(iii)
Existing sales assistants shall find the new system easy to learn. This is a usability requirement. A suitable fit criterion could be:
After receiving 4 hours of training, 90% of existing sales assistants are able to use the new system correctly.
The system shall be capable of responding to requests within 0.2 second.
This is a performance requirement. A suitable fit criterion could be:
The system responds to a request within 0.2 second in 95% of cases.

23
Q

(i) Consider the add product to order use case and write the signature for a corresponding operation addProductToOrder, with parameters of types Order and Product. Assume Store is the system class.

A

(i) context Store::addProductToOrder(order : Order, product : Product) : String

24
Q

Write the pre and post-conditions for the addProductToOrder operation.

A

(ii)
pre
– none
post
– if getStockLevel() > 0 then
– the product will have been linked to the order
– the stockLevel of the product will have been reduced by 1
– a string indicating success will have been returned
– otherwise a string indicating failure will have been returned

25
Q

A taxi firm charges a fixed minimum of £3.00 plus £1.00 per kilometre travelled. For journeys starting between the hours of 12:00 and 06:00 there is an additional charge of £1.00.
An operation is required which will calculate the charge given the distance and the time of day.
(i) What is the input data space for the operation?

A

The input data space consists of all possible combinations of a 24-hour starting time and a distance in kilometres

26
Q

A taxi firm charges a fixed minimum of £3.00 plus £1.00 per kilometre travelled. For journeys starting between the hours of 12:00 and 06:00 there is an additional charge of £1.00.
An operation is required which will calculate the charge given the distance and the time of day.

Explain how you would use the strategy for black-box testing to choose a good set of test data for the operation. Assume that design by contract (DbC) is being used.

A

We can partition the time into two subdomains: between 12:00 and 06:00 inclusive, and times outside that range. We should choose a set of times consisting of a central value in each subdomain, and values on and near the
boundaries at 12:00 and 06:00.
For the distance there is only one subdomain. We should choose a set of distances consisting of the extreme value at 0 km, the near extreme value at 1 km, and a typical a typical value such as 10 km.
A good set of tests will involve testing at all the possible combinations of a time and a distance chosen from the sets described above.
(Note that given that DbC applies there is no need to test with invalid inputs.)