2022-23 SCC.204 Exam

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

2023 EXAMINATIONS

Part II

COMPUTING AND COMMUNICATIONS – Written Exam [2.5 hours]

SCC.204 Software Design

Candidates are asked to answer THREE questions from FOUR; each question is worth a total of 25
marks

Use a separate answer book for each question.

.
Airport Car Park Scenario for Questions 1 and 2

An airport needs software to run its car park management system. The airport’s car park is divided
into four different sections:

1. Short stay only for cars (£5 per hour) and motorbikes (£2 per hour).
2. Medium stay only for cars (£20 per day) and motorbikes (£10 per day).
3. Long stay only for cars (£10 per day) and vans (£20 per day).
4. Concierge parking only for cars: £30 per day.
Automatic vehicle recognition via smart cameras is enabled at the car park entrance and exit. On
entry and exit, vehicle information (registration plate, entry and exit dates and times) is stored by
the software on the cloud.

Smart cameras are also located around the car parks to enable car locations to be tracked via their
registration plates within sections of the car park. Each parking bay has a sensor identifying whether
a vehicle is occupying the space or not and if occupied to store the registration plate.

The software must take online car park pre-bookings via a website. For each booking the system will
store information about the vehicle: type (van/car/motorbike), registration plate, driver details
(name, address, mobile number, email), the stay (car park arrival date and time, car park departure
date and time) and payment details (credit/debit card details). The software must calculate parking
costs and take payment for booked vehicles via the online service’s payment system before arrival.
All data is stored by the software on the cloud.

Drivers without an online booking can use the parking payment machines in the airport to pay
before leaving. There is an additional 20% cost added to without online bookings.

The system must provide a variety of management reports detailing occupancy levels across the car
park sections and providing income per day for each car park section.
Question 1

1.a. Provide a class diagram for the airport car park system described above showing:

i. The classes needed


[5 marks]

ii. The relationships between the classes


[5 marks]

iii. Required labels on relationships


[3 marks]

iv. Correct class diagram notation


[4 marks]

v. Implementation of the SOLID principles using abstract classes and/or interface classes
where necessary.
[4 marks]

1.b. Explain two SOLID principles that you have implemented and show where they are used in
your class diagram.
[4 marks]
[Total 25 marks]
Question 2

2.a. Draw a ball-and-socket diagram for the overall architecture of the airport car park system
provided above. Use a Controller/Manager in your design and show:
i. All sub-systems and their components (limit the decomposition
to two levels)
[10 marks]

ii. The relationships between sub-systems


[7 marks]

iii. The system interfaces


[4 marks]

2.b. For two interfaces of your choice provide their full description (i.e., name, operations,
input, output, and exceptions if any).
[4 marks]
[Total 25 marks]
Question 3

3.a. A Lancaster medical practice uses a mobile software application to enable patients
to book appointments, receive call-ups and view their medical record. Describe five
possible non-functional requirements for the system.
[5 marks]

3.b Many train stations in the UK have automated ticket-issuing machines (ATIM) that sell
train tickets. Each ATIM contains embedded software to drive the machine hardware.
When the user presses the “buy ticket” button, a list of start and destination stations is
displayed, along with a message to the user to select a journey (i.e., travel time, start
station, destination station, and travel class). A user may optionally reserve a seat on
train by browsing available seats and making a selection. All journeys are managed by
an external journey manager system that also keeps a record of all tickets issued.

After a journey is selected, the cost is displayed, and the user requested to pay by
inputting their credit card. If the credit card is valid, the user is asked to input their
Personal Identification Number (PIN). The transaction is verified by the user’s bank. If the
transaction is approved, the ticket is issued and the user’s account debited, otherwise
the transaction is terminated. A user may cancel their ticket purchase at any time before
inputting their PIN.

i. Draw a use case diagram for the automated ticket issuing machine.
[14 marks]

ii. Write a use case description that shows the flow of events when a user buys a
ticket.
[6 marks]
[Total 25 marks]
Question 4

4.a. Giving reasons for your answer, suggest possible design patterns that may be used
to develop each of the following software systems:

i. A fitness smart watch that displays and updates various health data in real-time
(i.e., as the data is captured by sensors).
[2 marks]

ii. A software system that generates and initializes large objects but preserves
system memory from being allotted to an object that may not be used in the
future.
[2 marks]

4.b. A company operates a paper recycling plant for three types of paper: cardboard,
white computer paper and magazines. The object-oriented software that controls
the recycling machines uses the same algorithm for each type of paper but allows
paper-specific classes to redefine steps in the algorithm. The algorithm has four
steps: (1) Sort paper, that sorts the paper collected by the company into different
recycling types. This is a common process for all the paper types; (2) Select paper,
that is used by paper-specific classes to select relevant paper types; (3) Build
driver, that creates and returns software drivers for the different paper types. A
driver is created by initializing the paper profile, the paper volume and the process
used in recycling it; (4) Start process, that initiates the recycling process. The
recycling process is different for different paper types.

i. Use a class diagram to show how the template method and builder design
patterns can be combined to design an appropriate software system for the
paper recycling plant. Your class diagram should not contain more than one
abstract class. Clearly indicate the template method and director class in your
class diagram.

Hint: Use the builder design pattern to implement step (3) of the algorithm.
[15 marks]

ii. Write Java code for the template method in the template method pattern.
Explain any assumptions that you make.
[2 marks]

iii. Write Java code for the director class in your builder design pattern. Explain
any assumptions that you make.
[4 marks]

[Total 25 marks]

---End of Paper---

You might also like