You are on page 1of 2

NATIONAL UNIVERSITY OF COMPUTER & EMERGING SCIENCES

Object Oriented Analysis and Design CL-309


Lab Session 01 Task

Student ID: __________________________________________ Time Allowed: 60 Minutes

Write the java code of the following use cases.


1.

2.
3.

4.
For example, think of a superclass called Animal that has a method called animalSound().
Subclasses of Animals could be goat, Cats, Dogs, Birds - And they also have their own
implementation of an animal sound (the goat maaa, and the cat meows, etc.):

5.
Create an overloading function to add two number and three numbers.
Create an overriding function to add two number and three numbers.

You might also like