Object Oriented Analysis and Design
Object Oriented Analysis and Design
Resular
iNSTITUTE OF ENGINEERING BE Full Marks 80
35
I S/hat are the differences between algorithmic decomposition and object- [6+4]
oriented decomposition in the process of systems analysis for a complex
system? What is the role of hierarchy, another feature of object-
orientation, in such decomposition process?
2 Explain four primary relations between classes; dependency, t8l
association, aggregation, and realization, with their corresponding
notations.
'3 What is behavior modeling in object-oriented analysis? Present any four [4+41
sample diagrams that are based on behavior rnodeling.
'4 A new bus service, Gana Rajya Express (GRE) is starting soon, which ll0l
i has the business plan and operation as detailed below.
GRE sells tickets only through the web service, not in bus
stations or in buses. Tickets must be paid by credit card or
online bank payment. Tickets are not bookable. Ticket can be
sold to the particular line, but not with particular seating
Iocation. The ticket can be cancelled, but GRE returns only a
portion of the ticket price. Canceltaticn can be handted via
Internet or via phone services. The closer to deparnrre, the
lorver part of the price shall be refunded. In addition to ticket
cancellation, it is possible to inquire about bus schedule
information via phone service. Tickets are electronic tickets
SYLLABUS
delivered via e-mail. The driver checks the right to travel by
reading the barcode on the ticket using mobile reading
terminal. GRE hires workers for different tasks. Traffic planner
establishes and closes down lines. He also shifts in demand, and
designs scheduies. Price analyst adjusts prices depending on
demand and competitors, Driver manager is the head of drivers
and allocates drivers and buses, and schedules services and
I 'Iransportation Department tests for the vehicles. GRE pays
hourly rate for drivers and telephone service staff. Other staff
will be paid by monthly salary basis. Non-core activities
[accounting, payroll, vehicle maintenance, computer
maintenance, etc.] rvill be outsourced.
Prepare and draw Use Cases with elaboration for the above scenario.
5 Bottle recycling machine has a control unit, bottle sensor, belt unit, [8]
the sum counter, the end button and the receipt printer.There are at
least states such as rvaiting, on run, on service and receipt printing.
The "on run" state can be refined witlt sub-states working blocked,
failure notification, emplying. You can add few nelv states according
to your own realization.
Draw a iiite diagram for the control unit
I
6 Your manager reviews your design and codes of a sub-module that you I8l
have prepared, as depicted in the below figure. She suggests you to
introduce subtotal( ) somewhere in your model thinking about the
performance of the system.
Modify your implementation and justify how does this update provides
you better performance.
7 What is exception and error handling in the context of system Is+s]
implementation? How does it differ fr<im other conventional method
versus the ob-l ect-ori ented method based impl ementation?
8 Explain the forking, joining, and branching features available in object- t4+4)
oriented based modeling? How does these primitive provide the closest
implementation model? Relate with any arbitrary sarnple.
I Write short notes. [2*s]
(a) Focus of control
(b) Methods of requirement gathering
tfi/4r /
,9 )iv'+'- { 2
, .--'--'-=:)
/u' lil'-;-
'. Y"b^
J
1
o "V
SYLLABUS
I
fi, ltc^
l
46 TRIBHWA}I UNTVER.SITY Eram. l{ t grr l:r r'
2. Explain all types of extemal actors in relation to System under Discussion (SuD). Draw a
system sequenoe diagram for the Library Management system with the following
reguirements. You can add additional elements if necessary.
A college library has 4 libradans to manage and issue t\e books to the users who are
either students or faculty staffs. The library contains the books belonging to Computer
and Humanities strearrs. The books are counle books, referenco books, book banks etc.
I
The users must log into system to search the required books and may reserye the books
earlier. The lib,rarian issues the books to tlre users and also charge fine in case ofdelayed
retum or loss of the book. The librarian asks for the nSanu Publisher" to supply the
necessary books into the library. The librarian manages all the users. 12+61
3. What do you mean by Domain Modeling? Present the guidelines to add attributes and
associations inthe domain model. t6l
4. Hou, can you represent the dynamic behavior of the system in Object Oriented Analysis
(OOA)? E><plain with example. t6l
5. Draw &e class diagram and map the desigrr into code for "Health Care Center" as
following: Patient can arrange and cancel appointment with physician using scheduler.
Physician secedes to prescribe Medication for patient. Physician Specifies Drug lnfo:
Medication name, Dosage Amount Number Doses and Refills. Computer Cross-Checks
SYLLABUS
for Conflict betuteen Medication and Current Medications/Lrledical History Prescription
Forwarded Elecronically to Pharmacy or Else Printed for Patient. ll0
6. a) In nrany ways, a deployment diagrarn is just a special kind of class diagram, which
focuses on a system's nodes. Justiff this statement. ts
b) Draw an exception class hierarchy to present the errors and exceptions derived from
the Throewable class. t:
1
7. How pattern differqt from framework? Explain information Expert, Creator and Low a
SYLLABUS
rJ
;I
rl
2
TRIBHUVAN UNIVERSITY
INSTITUTE OF ENGINEERING
I Examination Control Division
2073 Bhadra
47
1. a) What makes the use-case diagram as an important in UML diagrams? Illustrate your
argument with a model use-case diagram for a particular scenario. t3+3]
47 As you are
b) What are requirements process alternatives before having 00 Analysis?
already familiar with IOE exam processes, prepare a brief SRS document following
unified process inOOAD. [3+5]
2. a) Describe the strategies to identifr conceptual classes' Describe the steps to create a
Domain Model used for representing conceptual classes. t6]
b) Consider a Rental Car System (RCS). A rental agency has multiple offices/locations
where customer can test drive and select a car for rental. The period of rental, terms
and conditions for rental is flexible. RCS has to take responsibility for loaning cars,
keeping track of availability of cars, retum of cars, billing, maintenance activities for
cars and keeping track of driver's availability and assignment in case of chauffeur
driver car rentals. Identiff the candidate objects with relationships of abovecase. t8l
3. a) For the case study given below identifu all classes, their relationships, attributes and
methods for each class. Also draw class diagram using standard UML Notation. XYZ
Marina is privately owndd corporation that rents boats and provides boat services on a
' lake. The Corporation needs automated system to track customers, leased slips (Each
space for boat in lake) and boats in the slips. The corporation has two types of boats
sail boat and power boat. Both types of boats are uniquely identified by their
attributes like registration number, manufacture year and boat length. The boat can be
leased on daily basis or yearly basis. The system should perform following tasks
creating lease, computing lease amount, assigring boats. Jhe system should also have
features of search for vacant slips leased to specific customers and generating
well.
SYLLABUS
customized reports. The system should have to implement billing system as t8]
b) For the above class diagram created apply object orierrted techniques to convert such
class diagram into implementation code in any of your favorite object oriented
programming language. Yow implementation code should clearly show class
definition, Attributes with their proper visibility and method signatures with required
parameter. t8l
4. a) How irrtbrface differ from implementation? Explain the concept of interface and
implementation in any object oriented programming languages. t6]
b)What are the major functions of Exceptions and error handling in the programs
development? Is it required to develop the program? Justiff it. [3+3]
5. What is singleton class? Explain the different types of visibility in object oriented design. [2+6]
6. Write short notes on: l4x4l
D Information content in forward and reverse engineering
ii) Datadictionary stability
iii) GRASP
iv) Types of interaction diagram and their focus
46 TRIBHTJVAN IJNIVERSI'fY
INSTITUTE OF ENGINEERTNG
,ti Examination Control Division
2074 Bhadra
Analysis and
Candidates are required to give their answers in their own words as far as practicable.
{ Anempt AII questions.
The figures in the margin indicute Fult Marki.
Assume suitahle data. if necessary.
l. a) What are the meaning of Object and Encapsulation in terms of OOAD? Explain
briefly with example. page no 2 and 44
l6l
b) Prepare the fully labeled use cases for cash u,ithdraw case of the banking system.
t6l
2. IN OOAD, there are various types of models, like conceptual,
structural, behavioral, etc.
What is the significance of these many different types of model? Explain with
illustrative
exarnples. page 45
t6l
3' What is the role of constraint specifications in a model diagram? The model
below figure
unts within the portfolio sub-head in any banking
ints highlighted and explain brief, what they mean.
l8I
0. 1
wrf€
,;:llil'ffilH"*,:'f#i
4.
)!hat are the perce-ptions of applying UML? Consider the Library System. Each book in a
library contains bibliography, each bibliography consists of
a number of reference to
other books' A book will be referred to in many cases and
therefore a reference can
appear in more than one bibliography. Use noun phrase
identification strategies to find
the conceptual classes ofabove cases.
[2+41
5. Present the mapping process for the figure below
model usiirg object-oriented based
pseudo-codes for capturing all irnponant aspects
of the model diagram.
u0l
SYLLABUS
-1il' ,i- , , "
_l:].,_*_ I
l.
ai li
;
.if,Si(lf)r.ii-i0 I,t i
tr:
! 1.i i 01
.r:h.+rrixlf.\r>rl
--. " . alir,:niis) : { !t:'}t 1tl:is '- --L----"*' "-'''
Slude.r,-t i t ior 1i1i1: : - - ^^-- -" --.-".4 rtslr; it:ict
i
t---.-.---.---..--..-.-- -j - 1 .:
f
i
.l
6. Prepare a comparative note on forward versus reverse engineering with mentioning the
merits, demerits and implementation challenges. t6l
'l 7. What is the purpose of CRC? Illustrates the concepts of coupling and cohesion in object
oriented design with suitable example. 12+31
8. What are pattem based design and its benefits? Prepare illustrative notes on pattern based
design. t6l
9. Identi! conceptual class and its supportive attributes for a Photocopier machine from the
description given below and draw the conceptual class diagram for the same. Initially the
machine is off. When the operator switches on the machine, it first warms up during
which it performs some internal tests. Once the tests are over, rnachine is ready for
making copies. When operator loads a page to be photocopied and press 'start' button,
machine stafts making copies according to the nurnber of copies selected. When machine
is making copies, machine may go out of paper. Once operator loads sufficient pages, it
can start making copies again. During the photocopy process, if paper jam occurs in the
machine, operator may need to clean the path by rernoving the jammed paper to make the
machine ready. t9]
10. Write short notes on:
[ax3]
a) Agile method
b) Association visibility
c) Dewey Decimal Numbering and its use in modeling
d) design Pattems and its use in OOAD
**t
SYLLABUS
I
32 TRIBHUVAN UNIVERSITY
INSTITUTE OF ENGINEERING Full Marks i 80
Exarnination Control Division Pass Marl$ i 32
2075 Bhadra
l. What are advantages of object oriented system over procedwal system? Explain
associatiorl aggegation and composition relationships with suitable examples. [2+61
\--- 2, What is operation contract? Construct a System Sequence Diagram (SSD) for online
examination system with necessary assumptions. t2+6)
3. How can you express exceptions in UML diagrams? Illustrate with possible exceptions in
any suitable scenario.
page 41 t6l
4. For the case study given below indentify all classes, their relationships, attributes and
rnethods for each class. Also draw class diagram using standard UML Notation. t8l
Makalu College operates intemational business in 10 location throughout the globe. The
college has its first 9000 graduates in 2010. The second keeps track of each studenfs
name, country of birth, current address. In order to maintain strong ties to its alumni' ttre
school holds various events around the world. Events have title, date, location and time.
The school needs to keep track of which graduates have attended which events. For an
attendance by a graduate at an event, a comment is recorded about information. School
oflicials learn from that graduate at that event. As with the events, school records
information learned from graduates. When an official knows that he or she will be
meeting or talking to graduate, a report is produced showing the latest information about
the graduate and the information leamed during the past two years from that graduate
from all contacts and events the graduate attended.
5. Describe the terrr Design pattern? Explain the purpose and benefits of information
E*prtt" Creator, Controller and Polymorphism design patterns defined by GRASP. [l+6J
a) Describe the term OOP, code refactoring. I2l
SYLLABUS
b) For the class diagram created in Question number 4 apply object oriented techniques
to converts such class diagram into implementation code in any of your favorite
object oriented programming language. Your implementation code should clearly
show class definition, attributes with their proper visibility and methgd signatures
with required parameter. t7I
l
The famous digital eatery at Durbar Marge, "Naulo Restaurant", which
is designed by
7. digital device,
IoE graduate engineers, processes everything either through Robot or with
,*"rft food p.eiatation'and cooking. Every tables-tops is equipped with.lar8e tablet
screen una .rring the table each customers sele, ts the food
items they would like to order'
once the customers selects the items, the restaurant system automatically dispatches the
food items selected as the order to the kitchen unit of the restaurant. Again, wJten the food
" will get called in by kitchen unit for
e number through system. The food plate,
ich delivers the food up to the customer
q is delivered and due bill is generated for
times as the
the food item of that table. This process might be repeated for multiple
the customer pays
additionat food ordering and serving might happen frequently. Finally,
accumulated bill eitheiswiping thJ rtraiUc.uit card or through
online payment' order
;kG process, order dispatchiig pro".rs, food delivery and paper bill carrying up to the
table-through irumans are eliminated so, they claimed it as complete digital rest'aurant'
SYLLABUS
tgl alr?xo rrgu 1:cds: rlceqc
puu url?xa tarfi uec slueprqs 'uralsAs cq1 q8norql ]usprUs o1 peprrro:d :adecl uorls:n$
poda: {ireqc pue ruexa alupiln 'urexo a1s1ap 'uexe e}uoro '1o1s ss-rnoc 'epoo aslno:
'pt ,(}1ncug q8norqt ruals.ds oql se8eueur roleJlsrulupv 'seJ Jo ecueJuslo eql salJuaA luu g
'>fueg eql q8norql paldacce oJE uorterlsr8el oqt rog s1ueru,,(ed "rrreye eql uorlerlsr8er
Jo
oql JoUE uoltrEultuuxe eq] JoJ ,(ed ot paisetbar eJ€ sluepnls 'rua1s.(s cql ur paprlo"rd urrog
SYLLABUS
euquo ei|1 q8norql luuxa ogl :o; relsr8a: uuo ]uopnls 'Surisrxe .ro eq uBO siuoprqs
'IrIO'rl1 ol papnord
pro,nssud pue oruerrrasn eql qlur urais,ts Jti] o] ^teu
m3o1 uec sluapnls
:8ur,a,roi1 o,1 se,.rue1s./,q uorleururexa
eoIItiC,, rnl rue:8urq ssei:) E pup sdrqsuoqeler 'sess,;1c trLreJcljJrp rqt ,(-lrtrrapl 'g
^\prp
ig] scliqsui:r1z 1a r
.:lu1 tlirr\\ urur8urp esp3 3sif ?,\{?,rG^suorleredo uolluilcf,ue?/.uoi}u,\.1-1s.rr.,(:essrcru
aql ur:tgred pue seuenll cql alputq ol elqe aq plnoqs uiels.d5 uorlzruresoil,(z,ttireg
5qI ss1ll3 dtre ro3: pIrB suoilBls o,ul ,trrz [raa,rlleq stEOS jo ,{-lqiqclrunc aql }noqE ertnbue
nuc re8uessud 'oJIIEIsIP aql puu le^€r1 -+o ssxlJ aiil Xq p:unu:e1ep sr suorl?]s o,\tl uoo^\lig
e-rBJ eqJ'( uo rrs pue redaal5'.lv prlqJ '.JV puoces ,JV lsllC,ssrlt lslg ) sessulc
Jo i{tee uI elqpll€A? slees Jo raqurnu p?urturel3psril e seq uiur} qc?A 'alorrr ]o euo nr sdols
UIP;I qoEo pue sulerl Jo roqurur B a,re eierlJ 'rueis,(g uorlu,\leso1 de.rapzg eq1 reptsuo:) "g
lf+g] 'pcrit.llu 1si1 .t.ro8a1u;; er{} 8ursn.{q ruersf,g 3ur1oog1
lJlicl; eI^oW ouIIuO roJ ssplc innldccuor eluprpuzJ eil] lsr.I 'Surleporu urerlro{ ouurfi 'p
40
[Z+i] 'uc1s,{s paiucllo icclqo aql aqrlosap ot prsn lurua:inberyo sac-1,{i
}ueleltrp
otll ]sri lstsi(ieuy paluellg l3elqo ur ueddeq ssaloid uoil"lrcrle luaurerrnbsJ soop .lo11 c
48
'uierSerp alqetrns iip,r
it+tl
r"1:qsuotleie; <<pualxe>> pu? <<apnl'.rur>> uieydx'g 4uerf,eip asllJ esll uo sdrqsrrorlcler
pecu€r\pE aql eju 1uq11 'rue1s;(s p3lLIcIJO l3eiqo pup pelueuo ucrleunC ucc,!\lcQ ared[ro3 ,Z
tsl 'soldruuxa
qllrl\ utllllsoduroc pue 'uorte8o,t3ie 'noqercossu ureldxil l,oou?]rrequr pu? ucrjulnsLicf,uJ
tiit^\ ix31uo3 ut iiStsap iEuorluo^uoc rcqlo ol mr1s,{s pesEq OO jo sooueleJJlp aqi ere leqiA See in books 't
'WFT av)rlptt! ut8.,tow aql ut sa,mBE[aq,1
'sucr4sanb
1f/ tdwally
su spJond. u,\\o Jrerp ur sJe,4&sue Jrorl] e,\r8 o1 parmbs-r oJB solpprpueJ
u8rsag pi.rB srsdlpuv peluouo toofqg - ."pa[qns
s.ro 6 Brll?II)
r/m i l-rBd / rEeA 8a0z
-: IStI aunuurBor; uols$lc IorluoJ uollBuFrr8xfl
6g j sr1re611pg sg IaaeT DNruAANI{)N'C CO SJi}UISNI
, JElnEau : 'rllEXf .tr.IISf, qAINII NYANHSIUJ
,
SYLLABUS
***
Suqpueq rorre pup uolldecxg (c
spt:r3 393 (q
laporr uorl.uluaruaidurl .sA lcporu pnlclecuol; (u
[r*; j :uo sc]oNi ucqs elu1\ .0I
l9+z] .oiciruuxa
aleirdo:ilde qi1,tt uruldxg pue:3erp uor-locJelur puu urerEurp sse1c u3rsep aqr 1110{
spolll0ru prr, uorlrugap 31peJ3 J/r rrc.,toi1 .6
lAlqrqrsr.\ Jsroursjud pue elnqrrrB sr iEql&
lsl 'dst uo xq paugep surelleri uf rscp usrqdrotu.,{1od pu" reiloriuoJ ,;o1zar3
'psdxe roireuuoJ{rrJo slu:oueq puu asoti:nd aqr ureldxg 'rrral}€d u}itrg *r"1 .g
"qf"q,r.r"g
till
tttl
rIlltt I
I
f-5siiimim;t"fiE;EiAf i
i'-"-*"o'""' I
I r ...---
I I rirgu:pja[Sufti,-f
l"- -* : 1.-.--. - - --- t
I DlrPElJWAbDtUr p3.\l?s ;
l+- -* --- --.--..r--- --
-- (urepElo;.1a3uur)
! :rnus
It
€
rE5<€--.-1
",ii^i*-l
1rri.rr,:5:Snlorsr;r1 | l,'rnrr.;rir:rrrl I
+-_._.J L_.__ -- l I ras.l l
i.._-_. J
tsl 'urcr8zp sirllJo s)rluuLues pue pesn Suroq
1oqur,(s,{re,to qir,n ad.,(tr
ruu.Eerp o-"t-l Irelep ur ureldxg 'l\ojrq :;ru?g .l-
su uiurEelsul 1o .uu1, cq1 slcrdap i3[ioirr erij