OOAD Midterm2020 Questions
OOAD Midterm2020 Questions
OOAD Midterm2020 Questions
MID-TERM EXAMINATION
Announcement Time: 8:00 AM, Tuesday, 21/04/2020.
Due Date: 8:00AM, Friday, 24/04/2020
Submission: on Blackboard & via Email
(Approved)
Full name: Nguyen Van Sinh, PhD. Full name: Nguyen Hong Quang, PhD.
- Purpose: Testing the students’ knowledge and skills on Object-oriented Analysis and
Design.
- Assessment: Individual work (Assessment No. 5): This part is worth 20% of the final total
score. The Mid-term 2020 questions are announced on Blackboard at 08:00AM, on Tuesday,
21 April 2020, under the link “Exams” of this OOAD course, with the title:
“Mid-term Exam 2020 Questions (Due Date: 8AM, Friday, 24 April 2020)”
- Submission: Students are required to submit the answers in MS WORD document, with
your FULL NAME and STUDENT ID on your front page, using both methods:
1. on Blackboard under the “Exams” link, and
2. via Email: [email protected], with your Email Subject
“OOAD Midterm Answers, <YourStudentID>, <YourStudentName>”
- Academic Honesty: Each student is required to work individually and honestly to answer
these mid-term exam questions. Any academic misconduct (e.g., plagiarism - the submission
of somebody else’s work in a manner that gives the impression that the work is your own) is
strictly prohibited and will be processed based on the International University’s regulations.
- No extensions will be given: Penalties are applied to late submission with the decision from
the School/University. If there are circumstances that prevent the answers being submitted on
time, an application for special consideration may be made. Note that delays caused by
computer downtime cannot be accepted as a valid reason for a late submission without
penalty. Students must plan their work to allow for both scheduled and unscheduled
downtime.
1
QUESTION 1 (20%):
a. Describe a typical software development process, with a clear explanation on what
are expected in each step of the process and input/output of each step.
b. Why do we focus on the two qualities “streamlined” and “rigorous” in our course?
QUESTION 2 (80%):
Problem Statement
DU-Rent is a company in car rental business. It has over 100 branches all over the country. It
has about 5,000 cars and makes about 500,000 rentals per year. The rentals spread across 100
branches: branches in major airports, branches in major cities, and branches in local agencies
such as hotels and garages. Each branch is identified by a branch number.
DU-Rent has several IT systems. We are concerned with one of them. This system is called
DU Rental System. Its main purpose is to maintain information of the cars and the rentals of
those cars. It is also used to manage the car fleet, e.g. moving cars from branch to branch
when necessary.
It is decided that the system will be constructed as a central system which has access to the
information about every DU-Rent branch. Later on, when it is installed at a branch, it will be
customized to restrict its access scope to an appropriate level.
DU-Rent Cars
Each car has a model, identified by a model number. Useful information about a model
includes a short description (which usually includes the model’s marketing name), automatic
or manual, petrol consumption (such as 1.5 liters or 6 cylinders) , number of doors. The cars,
on the basis of their model, are divided into five groups, group ‘A’ to group ‘E’, and all the
cars in a group have the same rental price.
DU-Rent Customers
DU-Rent estimates that about 15,000 customers per year are served, of whom about 12% rent
frequently, 40% rent between 3 to 5 times per year, and 50% are one-off renters in the sense
that they use DU-Rent once per year or less.
In fact, DU-Rent shares a (much larger) customer information base with other businesses
including various airlines and hotel providers. However, the sharing of customer information
is done through a separate system. This is done so transparently (for both querying and
updates) that we think of the shared customer base as part of the current system (for querying
and adding customers).
A blacklist of customers is maintained by DU-Rent. It is updated periodically based on the
reports from the branches. The maintenance of the blacklist follows a separate process that we
do not need to be concerned with. We can simply assume that the list is available for
querying.
A discount customer list is also available. Customers on this list are given a 10% discount for
their car rents. The list is maintained by a separate system. We can simply assume that the list
is available for querying.
Thus, regarding the customers, a list of customers, a blacklist, and a list of customers entitled
2
for discount are available for querying. In addition, the branches are also allowed to add new
customers to the customer list.
3
Location of Travel
Pick-up Branch: Melbourne Airport
Return Branch: Melbourne Airport
When
Pick-up Date: 20-AUG-2010 Time: AM 10.00
Return Date: 22-AUG-2010 Time: AM 10.00
Type of Car (Make one or more selections)
Economy: ü Station Wagon:
Compact Car: Van:
Medium Size: ü 4 Wheel:
Full Size: Sports/Luxury Car:
3. The clerk finds out from the system if an appropriate car is available at the requested
branch or a neighboring branch and the cost (which is often of interest to the customer).
Branches A and B are neighboring branches if any car at A can be requested to be moved
to B overnight and vice versa (see subprocess BP1.2). Each branch has a list of
neighboring branches.
To find out if a car is available is not a trivial task. We can apply simple search rules as
well as quite sophisticated search rules. Currently, DU-Rent uses the following simple
search rule.
Simple Search Rule:
A car is available if
(1) Its status is RENT-READY
(2) It matches the types of car the customer asks for
(3) It is at the requested pick-up branch or one of its neighboring branches
4. If no car is available, the clerk fills out a paper form which contains the requested pick-up
branch, pick-up date and time, types of car wanted, and the customer contact phone
number and/or email address. The supervisor may negotiate to have a car delivered to the
requested branch and inform the customer about it. (It is not part of the responsibility of
the system to support this sub-process.)
5. Otherwise (i.e. one or more cars are available), the clerk selects a car and put it on hold,
that is sets it status to “HELD” (so that other operators will not reserve it).
NOTE ON ALTERNATIVE: If the deal does not go ahead as planned the clerk must
release the hold on a car.
6. The clerk then asks for the customer’s driver license to check if the customer is
blacklisted or not.
7. If the customer is new, the clerk will enter the new customer to the customer base. The
following information is entered: the customer’s first name, last name, driver license,
email address (if available), and contact phone number (if available).
8. If the customer is not black listed, a new transaction, which is called a rental, is created.
The new rental has a unique rental number (generated by the system) and has its status set
to “RESERVED”.
4
In addition to information about the reserved car, the pick-up and the return (date, time,
branch), the clerk also enters information about payment.
A deposit of 10 % of cost (which may involves discount) has to be made by the customer.
The payment can be made against the payment item “Deposit Payment” (the other
payment item is “Cost Less Deposit Payment”). Payment amount and payment method
(cash or credit card) are recorded. If the payment is made by credit card, the credit card’s
details are obtained and validated. The validation is performed by a call to another
system.
The car assigned to this rental will have its status set to “RESERVED”.
NOTE ON ALTERNATIVE: The customer may be a new one. In this case, his or her details
are entered to the system as described in the previous process.
5
Business Process: Picking-up a Reserved Car (BP1.3)
Starts when: The customer arrives at a branch to pick-up a car that has been reserved
Ends when: The car has been picked-up
Description:
1. If the reserved car is not available for some reason (e.g. overnight trip failed, which is
rarely the case), the clerk will replace it by another car (if possible).
In this case, the previously reserved car will have its status set to “EXCEPTIONAL”, and
the substitute car will have its status set to “HELD” (so that no one else can put it on
hold).
2. If a substitute cannot be made, the clerk sets the status of the reserved rental to
“EXCEPTIONAL” and also ensures that the status of the reserved car is set to
“EXCEPTIONAL”.
The case is then referred to the supervisor to arrange for a refund. (It is not part of the
responsibility of the system under study to support this process.)
3. Otherwise, the clerk checks the driver license to see if it matches the license used for the
reservation. If a different driver license is used and the new driver is not blacklisted, a
change of driver can be made.
4. The clerk asks for the rest of the payment and enters the payment details is entered. The
payment item is “Cost Less Deposit Payment”.
5. The clerk also enters the actual pickup date and time. The status of the rental is changed
to PICKED-UP. The status of the car is also changed to PICKED-UP. The car’s mileage
is recorded again the rental record.
6. The customer picks up the car.
NOTE ON ALTERNATIVE: A customer may cancel a reservation or may simply not turn
up. In either case, the rental will be cancelled and the customer losses their deposit. The
rental’s status is set to “EXCETIONAL”, and the car’s status set to “RENT-READY”.
NOTE ON SUBSEQUENT ACTIVITIES: The car will need to be inspected before returning
to the “active” pool ready to be rented. The car can also be set aside for services or to be
removed from the fleet..
6
Business Process: Arranging for Car Maintenance (BP2)
Starts when: One or more cars need to be inspected
Ends when: Decisions have been made about the cars
Description:
1. The supervisor prints the list of cars to be inspected if necessary (for example, the list of
cars that were returned to the current branch).
2. The supervisor inspects the cars. The outcome for a car can be that it is OK, or that it
needs servicing, or that it is to be removed, and the supervisor will have its status updated
accordingly, i.e. RENT-READY, SERVICE NEEDED, or REMOVED respectively.
3. Supervisor arranges for necessary actions. (It is not part of the responsibility of the system
under study to support this activity.)
NOTE ON SUBSEQUENT ACTIVITIES: Later when a car has been serviced, and becomes
available at a branch, the information about the car is updated.
Tasks
For this exam, you are required to do the following:
The business processes you have to consider include those given as NOTE ON
ALTERNATIVE or NOTE ON SUBSEQUENT ACTIVITIES (regardless of whether
7
these processes are described separately or not).
If for certain processes to make sense, you think additional details or even additional
processes need to be added, then by all means do so. In such cases, clearly describe your
additional details or processes.
You must list your use cases against the steps in business process descriptions (given or
added by you). Each step of the business process corresponds to zero or more use cases.
Set up your answer in a table in the format shown below:
2
… … … …
… …
(b) Describe each of the use cases identified in Part (a) using the Event Flow Format (with
Main Flow/Extensions)
For ease of reference, give each use case a number.
Though there are dependencies among the use cases, you can ignore the specification of
invocation constraints and post obligations. This is done to keep the descriptions simple.
We do not seem to lose much information by not specifying those constraints and
obligations.
NOTE ON MARKING: You are required to describe all the use cases, but about 5 use-
case descriptions will be selected to mark in detail.
SAMPLE SOLUTION:
The business process BP2 (Arranging for Car Maintenance) has been done as a sample
solution for you as follows.
8
Their use-case descriptions (with the Main Flows only) are given below as a sample.
Your answers must be provided in detail with the full the Event Flow Format.
9
THE BELOW STATECHARTS FOR REFERENCE ONLY:
To accomplish all the tasks above, it may be useful for you to consider the statecharts below
for (a) Car, (b) Rental with Reservation, and (c) Rental without Reservation.
Statecharts for Car
Basic Statechart – with exceptions being left out
From any state – except “REMOVED” – we can go to the special catch-all state
“EXCEPTIONAL”. This state covers the cases: Customer cancels reservation, or Reserved
car is not available, or DU-Rent cancels a reservation, or a Picked-up car has an accidence,
etc. Each time, one of these events happen, the car is moved to the state of
“EXCEPTIONAL”. From this state, it can go to: RENT-READY, SERVICE NEEDED, or
REMOVED.
10
Statechart – With exceptions being modeled by a catch-all EXCEPTIONAL state
11
Statechart - With exceptions modeled by the Exceptional state
12