You are on page 1of 7

UNIVERSITY OF MAURITIUS

FACULTY OF ENGINEERING

FIRST SEMESTER EXAMINATIONS

NOVEMB
NOVEMBER/DECEMBER
ER/DECEMBER 2010

PROGRAMME BSc (Hons) Information Systems

MODULE NAME Software Engineering (Special Paper)

DATE Wednesday MODULE CODE CSE 2001Y(5)


24 November 2010

TIME 09.30 – 12.30 DURATION 3 hours

NO. OF 6 NO. OF QUESTIONS 5


QUESTIONS SET TO BE ATTEMPTED

INSTRUCTIONS TO CANDIDATES

There are 2 Sections in this paper: Section A and Section B.

Section A consists of 3 questions.


Section B consists of 3 questions.

Candidates are required to answer any FIVE (5) Questions.

Use separate answer books for each Section.

All questions carry equal marks.


SOFTWARE ENGINEERING – CSE 2001Y(5)

SECTION A

Use separate answer books for each Section.

Question 1

(a) An object has state, behaviour and identity. Briefly explain, what you understand
by this statement? [3 marks]

(b) Binding is the process of connecting a method call to a method body. Using the
concepts of overloading and overriding explain the difference between static
binding and dynamic binding. [2 Marks]

(c) Consider the following relationships between components of a Java program:


(i) class B implements interface A
(ii) class B extends abstract class A

Briefly explain each of these relationships, stating any restrictions on, and
significant implications of, its use. For each, include an example illustrating an
appropriate use of the relationship. [4 marks]

(d) A company employs two types of worker. One, a salaried worker, gets paid a
fixed weekly amount, while the other, an hourly worker, is paid according to the
number of hours worked. The system identifies each worker by an identity
number, and it also stores their surname. The company wishes to develop a
payroll system which can be used to compute the total weekly wages bill.

Develop a solution to this problem using inheritance and polymorphism where


necessary.

(i) Write down the Worker, SalariedWorker and HourlyWorker classes.


Provide a constructor, a method for computing the weekly wage, and a
display method in each case. You do not have to provide set and get
methods unless they are required to support the payroll computation.
[8 Marks]

(ii) Write a test program which sets up an array of employees and prints out
a line for each employee together with the total weekly wages bill. Show
what output you expect to obtain from your program. [3 Marks]

Page 1 of 6
SOFTWARE ENGINEERING – CSE 2001Y(5)

Question 2

(a) A computer system is required that will support the following small garage
business.

Customers bring their cars to the garage for servicing and repair. The attendant
must check in the car, record details about the owner and the car, along with any
specific customer requests. The workshop manager inspects each car and creates a
job specification for it. He then schedules the job and assigns a mechanic to
complete the specified tasks. During this process, if any new problems are
discovered a new job specification is created by the workshop manager before
carrying out the work. When the job is finished the mechanic completes a report
detailing the time spent, work done and materials used. This information is used
by the attendant to create an invoice for the customer when they come to collect
their car.

(i) Draw a suitable use-case diagram to represent the above system.


[4 marks]

(ii) Construct a Class Diagram for the above system using the UML notation.
Include appropriate attributes and operations for each class. [6 marks]

(b) A system is to hold information about books contained in a library. The


information held about each book consists of its author, title and status (i.e. on
loan or on the shelf).

The library object contains an array of books and methods to add books, remove
books, lend and return them.

Books are identified by an integer value representing their position in the array.
When a book is added to the library, the system should indicate its position and
this is used subsequently to identify the book.

Create two classes as follows:

A Book class with methods lend, bringBack and onLoan to check if a book is on
loan and a Library class with methods addBook, deleteBook, lend and
bringBack.

Note that abook which is on loan cannot be lent and a book which is not on loan
cannot be returned. Similarly a book cannot be added to the Library if it is full
and cannot be deleted if it does not exist or is on loan.

The methods lend, bringBack, addBook and deleteBook should return true or
false to indicate success or failure and the Library constructor should allow the
maximum number of books to be defined. [10 marks]

Page 2 of 6
SOFTWARE ENGINEERING – CSE 2001Y(5)

Question 3

(a) Implement a class named Bungalow with the following private fields
num_days <int> Number of days bungalow is booked
num_room <int> Number of rooms
The class contains
− a constructor that requires arguments for num_days and num_room.
− a method that displays the details of the bungalow booking
− a method that calculates and returns the bungalow charges, based on the
following daily rental charges

One Bedroom Two Three Bedrooms


Bedrooms
US $ (per 200 300 400
day)
[6 marks]

(b) Implement another class named BungalowWithPool, which inherits from


Bungalow. The class contains one private field
pool_size <String> Swimming pool can be either small or large

The class contains the following methods:


− a constructor that requires arguments for num_days, num_room, and
pool_size
− a method that displays the details of the bungalow booking
− a method that determines the bungalow charges. A small and large
swimming pool carries a flat additional charge of US $ 40 and $ 60
respectively.
[6 marks]

(c) Implement a class CreateBookings that will create an array of 5 bungalow


bookings as follows:

Bookings No of Number of
Number days rooms
1 2 2
2 3 1 Small swimming pool
3 1 3
4 2 2 Large swimming pool
5 5 1 Small swimming pool

Your program should then display


− The bungalow details of each booking
− The total of charges of all bookings
[8 marks]

Page 3 of 6
SOFTWARE ENGINEERING – CSE 2001Y(5)

SECTION B
Use separate answer books for each Section.
Question 4
(a) You are the project manager of software development house, and have been
asked to undertake development for the following special project: a new
interactive Help System for common computer-related problems will be created.
This pseudo-system will have intelligence capabilities that will query the user
about the specific problem currently faced in the use of a computer; the user will
provide information through a series of natural language-based inputs.
Understandably, this type of system is new to the industry, and your proposed
development should take this into account. In addition, given the fact that the
mechanism of user-to-system interaction is important in this scenario, the details
of the functional capabilities of the system are not clear.
Given the above scenario, recommend a life-cycle that you would adopt for the
new system.
• Justify your answer by explaining why you have chosen this life-cycle
ensure that you provide clear evidence for your choice of the life-cycle.
• Describe all the stages of the chosen life-cycle.
[8 marks]
(b) Read the following a set of requirements.
- The amount of insulin to pump into the blood stream shall be estimated
based on the average of the difference between the actual blood sugar
level and the normal blood sugar level over the last three different points
in time.

- The blood sugar monitoring system should be able to normalize the blood
sugar level in a very short delay.
- The systems shall produce a listing of late borrowers and the amount of
fines due.

(i) Classify the above requirements under functional, domain and


non-functional requirement. [3 marks]

(ii) Identify one requirement from the set of requirements given above
that is not verifiable. Rewrite the requirement such that it is
verifiable. [2 marks]

(c) One quality requirement often stated is that the system should be `user-friendly'.
Discuss possible differences between the developer's point of view and the user's
point of view in defining this notion. State alternative ways to define system
usability in measurable terms. [4 marks]

(d) Discuss the pros and cons of letting software engineers rotate between projects
from different application domains as opposed to constraining software
engineers to a specialised application domain. [3 marks]

Page 4 of 6
SOFTWARE ENGINEERING – CSE 2001Y(5)

Question 5

(a) Suggest appropriate reliability metrics for the following classes of software
system. Give reasons for your choice of metric.
• a system which monitors patients in a hospital intensive care unit;
• a word processor;
• an automated vending machine control system;
• a system to control braking in a car;
• a system to control a refrigeration unit;
[5 marks]

(b) Explain why program inspections are an effective technique for discovering
errors in a program. What types of errors are unlikely to be discovered through
inspections? [5 marks]

(c) The tables below show the information domain characteristics for a project and
the complexity value associated with each count respectively.

Domain characteristics Number Weighting


User inputs 53 Simple
User outputs 40 Average
User inquiries 20 Average
DB Tables 15 Average
External interfaces 4 Complex

Parameter Simple Average Complex


User inputs 3 4 5
User outputs 5 6 8
User inquiries 3 6 8
DB Tables 9 11 16
External interfaces 7 9 12

(i) State the strengths of function-oriented metrics over size-oriented metrics.


[2 marks]

(ii) Calculate the function point value for the above project. Assume an
average complexity for all “technical complexity factors” (that is 2.5).
[4 marks]

(iii) From records of past projects undertaken in the company, the average
productivity and the average cost have been 25 function points per person
per month, and Rs 15 000 per function point respectively. Assuming the
development team of the company consists of 15 developers, estimate the
duration and cost of the above project. [4 marks]

Page 5 of 6
SOFTWARE ENGINEERING – CSE 2001Y(5)

Question 6
(a) MobiSoft, a newly established software company in the country has just
managed to employ a number of staff personnel and has promised to offer an
attractive salary package. Many of them are fresh university graduates and may
require some training. The company is now involved in developing a software
product that will be launched in 14 months time. A somewhat similar product is
already on the market and is selling very well. The project is in the analysis
phase and the customers are requesting to have a prototype to get a feel of the
product. Being a new company, its design standards and quality requirements
are not yet set.

(i) Briefly explain what are project risks, technical risks and business risks.
[3 marks]
(ii) Identify five risks from the above problem statement, and categorise them
under project, business, technical risk. [5 marks]

(iii) State risk mitigation strategies for each of the risks identified in part (ii).
[5 marks]

(b) Consider the following flow graph.

(i) Based on the Basis Path Testing technique, calculate the value of
Cyclomatic Complexity of the flow graph given above. [3 marks]

(ii) Based on the value of Cyclomatic Complexity calculated, derive the set of
basis test paths. [4 marks]

END OF QUESTION PAPER


/ph

Page 6 of 6

You might also like