You are on page 1of 10

BACS2053 Object-Oriented Analysis and Design

Tutorial 6 : Interaction Diagrams

Question 1
Construct a design sequence diagram to illustrate the Flight Ticket Reservation) use case “Book flight
ticket” (refer to T3Q1 with the following descriptions:

“To book flight ticket, customer is required to fill in flight requirements such as origin, destination,
departure date, return date and number of passengers. System will show all the available flights
based on the flight requirements provided by customer. Customer will then select the preferred
scheduled and enter the passenger details. Once customer confirmed the flight booking, the booking
record will be created.”

You are required to include actor, boundary (UI) object, control object, entry objects and object
creation in your diagram.

Area Marks Allotted


Correct actor, boundary(UI), control and entity 3
objects
Correct new object creation 2
Logical flow of events with messages clearly 5
labeled
Correct notations used 1

Question 2
Construct a design sequence diagram that shows a normal flow of events for “Place Order” use case
process. Assume that the customer has logged into the system. Your diagram should include actor,
boundary, control and entity objects. The process of placing order is as follows:

After a customer adds a dish into the cart, customer can further modify the ingredients of the dish such
as: adjust the amount of spices, garlic, gravy, vegetables and meat. Customer can also exclude certain
ingredients such as onion, certain vegetables. Each dish comes with different size of portion which
are: Large, Medium, and Small. After confirm with the dish, customer can select delivery details such
as exact delivery location, payment mode, delivery date and time. Each order that exceed RM15 is
entitled with a free soup, drinks or fruits, which customer can select one. Additional special services
are also included such as: simple boutique of flower, small gift, cards, slice of cake, if customer would
like to add on in their order. For order more than RM100, an electronic voucher will be presented to
the customer upon checkout.

Area Marks
Correct new object creation and actor 3
Correct notations used 2
Logical flow of events with messages clearly 8
labeled

7
BACS2053 Object-Oriented Analysis and Design

Question 3
MyGift.com is a website selling souvenir from all over the world. The three different categories of
gifts are: man, woman, and kids.

Construct a design collaboration diagram for “Create NewPromotion Event” use case for
MyGift.com. Assuming that the administrator has login. You are required to include boundary (UI)
object, control object, entity objects and object creation in your diagram.

Area Marks Allotted


Correct actor, boundary(UI), control and entity 3
objects
Correct new object creation 2
Logical flow of events with messages clearly 6
labeled
Correct notations used 2

Additional Question
Construct a design collaboration diagram for “Book flight ticket” based on the description given in
the T6Q1.

8
BACS2053 Object-Oriented Analysis and Design

Tutorial 7 : Specifying Operations

Question 1
Explain TWO (2) reasons Object Constraint Language (OCL) is needed to specify operations in a
class.

Question 2
The following diagram shows Payment design class diagram for the Online Furniture Sales Ordering
System
Construct TWO (2) Object Constraint Languages (OCL) for the Payment class.

Question 3
MY bank offers credit card services to their customers. Each customer (aged 18-60 years old) is
allowed to apply for one MY credit card. In the credit card application process, customer should
register an account with MY bank with minimum RM500 deposit. Then the customer is required to fill
in the credit card application details. After submitted the application, MY officer started to process and
investigate customer’s financial background. Application will be approved if the financial background
of a customer is strong and a notification email will be sent to the customer. Customer will receive the
new credit card within 3 working days.

Identify THREE (3) appropriate Object Constraint Language (OCL) in designing the MY credit card
application system.

Question 4
Write Object Constraint Language (OCL) for the following requirements.

a) The end time should be greater than start time for a team meeting.

b) A total of RM10 discount will be provided when the order amount is more than RM200.

c) A student must have fulfilled a minimum of 30 credit hours to progress to the final level of
study.

d) An employee who registers one car sticker in the company must possess at least one year of
driving experience

9
BACS2053 Object-Oriented Analysis and Design

Tutorial 8 : State Diagrams

Question 1
Construct a state chart diagram for flight schedule class with the following descriptions:

Once the customer has booked the flight ticket, the customer can keep track his/her flight by checking
the flight status online. When an airline staff added a new flight schedule, the initial status of flight is
set to Scheduled. If the flight is going to depart 15 or more minutes after its scheduled departure gate,
the flight status will change to Delayed. When the flight has left the departure gate, the flight status
will change to Departed. When the flight is airborne and the takeoff time is the “wheels up” time, the
flight status will change to “In Air”. Lastly, when the flight has arrived at its destination gate, the
flight status will change Arrived.

Question 2
MY bank offers credit card services to their customers. Each customer (aged 18-60 years old) is
allowed to apply for one MY credit card. In the credit card application process, customer should
register an account with MY bank with minimum RM500 deposit. Then the customer is required to fill
in the credit card application details. After submitted the application, a status of “New” will appear in
the application record. When MY officer started to process and investigate customer’s financial
background, the status will be updated to “Processing”. Application will be approved if the financial
background of a customer is strong and a notification email will be sent to the customer. Customer
will receive the new credit card within 3 working days. Once the customer has received the credit card,
customer is required to activate the credit card through mobile or website application within two
weeks, else the credit card will be nullified. The record will be kept for 1 year.

Construct a state chart diagram for the credit card class. Include event name, guard-condition and
action-expression in your diagram.

Area Marks Allotted


Correct states 6
Correct guard condition 2
Correct events 2
Correct notations used 1

10
BACS2053 Object-Oriented Analysis and Design

Question 3
ZAPI is a company manufacturing DIY T-Shirt. Customer is allowed to design their own T- Shirt
online, place order, and make payment. An order is confirmed once the payment is made. The order
will be sent to Art and Design department to finalize the T-Shirt design. Once the Art and Design
department has finalized the design, order status will be changed from "Processing" to "Printing". T-
Shirt will be printed at manufacturing department. ZAPI staff will change the order status to
"Delivery" once the T-Shirt has been sent to Courier Company. Customer has to sign a receiving form
once the customer has received the T-Shirt. Courier Company staff will then change the order status to
"Received". If nobody receive and sign the parcel, the order status will be changed to "Returned"
status. The order records will be saved for five years. Design a state chart diagram for Order class.

Area Marks
Correct states 6
Correct notation 1
Correct guard messages 2
Correct transition messages 2

11
BACS2053 Object-Oriented Analysis and Design

Tutorial 9: Software and System Architecture

Question 1
In the design of software architecture, layering and partitioning are two important approaches that will
be used by most software engineers.

Differentiate between partitioning and layering in the system development context and explain why
system developers prefer to divide a software system into subsystems with different layers.

Question 2
QuizGame is an online system that allows lecturers to conduct quizzes in the lectures and tutorial
classes. QuizGame consists of two main module which are: Admin (lecturer), and Players (student).
Lecturer can create, edit and delete quizzes. Students are allowed to play real time quizzes conducted
by lecturer through smartphone and laptop.

a) QuizGame consists of the following components:


User Interface Login.aspx, Main.aspx, Quiz.aspx, Report.aspx
Application Classes Quiz.cs. Report.cs
Dataabse Quiz.xml, Record.xml
Construct a component diagram.

b) Design a deployment diagram. The system is resided in one Application Server and one
database system

Question 3
Consider the following scenario:

In COVID-19 pandemic, Malaysia has been facing a difficult time combating COVID-19 cases and
attempting to flatten the curve of new cases. In addition, this pandemic outbreak has been affecting
economic nationally as well as business income as Movement Control Order (MCO) being placed. As
such, the Prime Minister of Malaysia introduces PRIHATIN Economic Stimulus package that
provides immediate financial assistance to lessen the burden of all, especially those who are affected
during the COVID-19 pandemic. However, the people are mandatorily to submit related information
in order to be benefited from the package. Thus, they are to submit the personal data by filling up a
web form, DataForm.jsp file. Upon web form submission, the form data will be processed/handled by
a controller in a logical layer of system, namely, DataHandler.java controller file. While completing
the process of data verification, the people can check the status of eligibility via a page called
CheckStatus.jsp file. The status includes Unsubmitted, Received, Processing or Successful/Fail are
retrievable by a DataHandler.java file from a specific data source. On the other hand, the agency
officers will then verify the submitted data according to personal income portfolio to either approve or
reject the application. Once the application is being verified, the immediate superior of the officers
will review the result again to confirm the application. This final step is carried out by the
ApproveReject.jsp file. After all, the Notification.java will send SMS notification to the applicant
about the result in turn the application status is considered to be complete. The fail application will be
ended.

a) Construct a component diagram for the PRIHATIN management system.

Criteria Marks
Correctness of Component 3
Correctness of notation used 1
Correctness of Association between components 2

12
BACS2053 Object-Oriented Analysis and Design

b) Design a deployment diagram that makes a software system available over the web. The
deployment process should consider the network security using firewall and different types of
client devices.

Criteria Marks
Correctness of Nodes 3
Correctness of notation used 1
Correctness of Association between nodes 1

Question 4

Based on the case given above, propose a simple three-layer architecture for the Online Furniture
Sales Ordering System.

13
BACS2053 Object-Oriented Analysis and Design

Tutorial 10: System Design & Details Design

Question 1:
a) What is coupling? Is this desirable or undesirable in a system? Why?

b) What is cohesion? Is this desirable or undesirable in a system? Why?

Question 2:

Figure 1: Inheritance hierarchy

a) Based on the Figure 1, explain why the inheritance class hierarchy is violating the Liskov
Substitution Principle (LSP).

b) Propose an improved version of the inheritance class hierarchy so that it is adhered to the LSP.

Question 3:

Explain the cohesive design. Redesign the XlsxReader class as shown in Figure 1.

XlsxReader

validatePath()
log()
getAll()
getAll(row, col)
write(data)
write(data, row)
Figure 1: Excel Reader

14
BACS2053 Object-Oriented Analysis and Design

Question 4:

Suggest FOUR (4) design qualities that must be included in Furniture online sales order system.

Question 5:
Jim Smith is the owner of a car dealership company that sells Ford, Honda, and Toyota cars.
The dealership keeps information about each car manufacturer with whom it deals with so that it can
get in touch with them easily. The dealership also keeps information about the models of cars that it
carries from each manufacturer. It keeps information such the model’s name and series, for example
Honda Civic LX.

The dealership also keeps information on sale such as the selling date and the amount paid for the car.
There are 2 types of buyers: individual customer and company customer. In order to contact the buyers
in the future, contact information such as address and phone number of the buyer will also be recorded
in the new computerized system.

Produce a design class diagram that will include attributes with data types, operations, collection
class (array), multiplicities and associations design.

15
BACS2053 Object-Oriented Analysis and Design

Tutorial 11: Data management design

Question 1
What is the key difference between a relational DBMS and an object DBMS.

Question 2
Assuming that staff can maintain many flight schedules. For each flight schedule, it can be maintained
by different staff. Design Relational Data Base Management System (RDBMS) tables to map with the
scenario. Resolve many-to-many relationship. Suggest appropriate attributes for all the tables.

Area Marks Allotted


Correct tables with appropriate attributes 9
Correct class association and multiplicity 2

Question 3
Identify the issue in the following class diagram. Construct an improved class diagram and its
associating relational database design (RDBMS).

Bank Account Customer

AccountID CustomerID
AccountType * * Name
OpenDate Address

16

You might also like