0% found this document useful (0 votes)
8 views

Object Oriented System Development 2018

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Object Oriented System Development 2018

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Kasun Ranga Wijeweera (krw19870829@gmail.

com)

UNIVERSITY OF RUHUNA

BACHELOR OF SCIENCE (GENERAL) DEGREE

LEVEL II (SEMESTER I) EXAMINATION – OCTOBER 2018

COM212β – Object Oriented System Development Duration: 2 hours


______________________________________________________________________________

Answer four questions only

1)
a) State the four fundamental principles of object oriented design. Briefly explain each
of them.

b) Briefly explain inclusion, extension, and generalization relationships between use


cases in use case diagrams.

c) Explain a simple technique for discovering domain classes in designing a class


diagram.

d) Briefly explain the three basic notations used for modeling concurrency between
activities in activity diagrams.

e) Write the four development phases of the Rational Unified Process.

2) Consider the following class diagram designed for a banking information system. Write a
java code to implement the diagram according to the instructions given below.

a) The class BankAccount contains three attributes: accountHolder, accountNumber, and


balance which represent name of account holder, account number and available
balance of the account respectively.

b) The method deposit is used to deposit a value amount to the account.

c) The method withdraw is used to withdraw a value amount from the account.

d) The method getBalance returns the available balance of the account.

e) The method display displays the values of all the attributes of the class including the
inherited ones.

f) The class SavingsAccount has the attribute interestRate that stores the interest rate of
the account.

1 of 4
Kasun Ranga Wijeweera ([email protected])

g) The method addInterest is used to add interest to the available balance of the account
based on the interest rate.

h) The class CheckingAccount has the attribute fee that is charged from the account.

i) The method deductFee is used to reduce the amount fee from the available balance of
the account.

j) You should use keyword super whenever possible.

BankAccount
# accountHolder : String
# accountNumber : int
# balance : double
+ BankAccount (accountHolder : String, accountNumber : int)
+ deposit (amount : double) : void
+ withdraw (amount : double) : void
+ getBalance () : double
+ display () : void

SavingsAccount
# interestRate : double
+ SavingsAccount (accountHolder : String, accountNumber : int, interestRate : double)
+ addInterest () : void
+ display () : void

CheckingAccount
- fee : double
+ CheckingAccount (accountHolder : String, accountNumber : int, interestRate : double, fee: double)
+ deductFee () : void
+ display () : void

3) Following requirements are gathered through the requirement analysis process to develop an
online shopping system. Draw a suitable use case diagram considering the given
requirements.

a) Any customer can view the available items. Further, they can search or browse for an
item in order to view. Customer also can add viewed items to a wish list.

b) A customer can register in the system.

c) Any customer can add items to a shopping cart. A user may login to the system in
order to checkout after adding items to the shopping cart.

d) A customer can view recommended items, if he wants, after viewing the available
items.

2 of 4
Kasun Ranga Wijeweera ([email protected])

e) During the checkout procedure, the total value of items is calculated.

f) The checkout procedure also involves calculation of taxes and shipping cost.

g) At the end of the checkout procedure, the customer can do the payment either by
using his or her PayPal account or credit card.

4) Following requirements have been gathered through the requirement analysis process for a
bank. Draw a suitable class diagram.

a) The bank is organized as divisions. Some divisions are further divided into
subdivisions.

b) A branch is a special division with an address and a branch number.

c) An account belongs to a particular branch and a branch can keep any number of
accounts.

d) Each account has a unique account number. The opening date and the closing date of
the account should be recorded. Further, an account has a balance and an overdraft
limit.

e) A particular account can differ from other accounts by its interest rate and periodic
fee. Furthermore, some accounts may allow issuing cheques. Also insurance facility
is available only for some accounts.

f) There are three types of accounts: mortgage accounts, chequing accounts, and credit
card accounts.

g) A mortgage account has a property: collateral. A credit card account has an expiry
date and a brand.

h) One or more credit cards can be issued for a credit card account with a unique name
for each card.

i) Each division has a set of employees and one of them manages the division.

j) A client can open any number of accounts. However, a single account can be jointly
owned by at most two clients.

k) An employee is assigned for each client as his or her personal banker.

3 of 4
Kasun Ranga Wijeweera ([email protected])

5)
a) Draw a class diagram for the following scenario.

The supervisors are appointed among the employees in a particular company. An


employee can supervise any number of employees. An employee can have at most
two supervisors.

b) Draw a class diagram for the following scenario and draw another equivalent class
diagram for the same scenario.

A student can register for many examinations. An examination can register by


many students. The grade earned by each student for each examination should be
recorded.

c) Draw an activity diagram for the following scenario.

Apex is an educational institute that offers several courses for students. A limited
number of students are allowed to enroll for a course. Furthermore, the student should
have completed certain prerequisite courses from the same institute in order to follow
particular courses. A student with special permission is allowed to enroll for a course
even though he or she has not completed prerequisite courses.

4 of 4

You might also like