You are on page 1of 2

OOAD ASSIGNMENT

17TH February 2022

1. Describe benefits of OOP


2. With the help of examples describe private, public and protected visibility modes as used
in classes
3. With the help of a diagram explain the types of inheritance
4. Describe at least four benefits and disadvantages of inheritance in OOP

5. I've developed an email system called JMUmble. In this system, arriving messages are
handled by a PostOffice object. Depending on how the system is configured at runtime,
one or more objects might need to know when a message arrives. I have currently
implemented several such classes: ScreenFlasher (which makes the entire screen flash --
you always know when a message has arrived), PopularityTimer (which starts a clock
that show the amount of time since the most recent message arrived),
and Mumbler (which uses speech generation to read the name of the person that sent the
message -- this is where the system got its name).
Use the Observer Pattern to develop a class model of this system (in UML).
You do not need to include the attributes of each class, only the operations/methods.
Include comments that describe each operation/method.

6. Draw a class diagram and object diagram based on the scenario below of a product
ordering system. Your class diagram should include relevant methods, attributes,
associations and multiplicity. You are allowed to create your own instances for object
diagram
Customers are able to place orders via an online system. An order consists of details such
as date of order and order number. An order must be confirmed online and payment made
for the order to be fulfilled and sent to the customers location based on the listed name
when the order was submitted. The customer in turn must acknowledge receipt of order
via the online system and the order must subsequently be closed by one of the company
staff online. If the order is not closed, the product will not be delivered. There are two
types of orders – special order and normal order. The only difference between a special
order and normal order is that for a special order, its shipment can be tracked

You might also like