Lab 11
Lab 11
Make a Chicken class that has sing, eat, move as member functions.
∙ During move, Print a message “Hii, I’m Enjoying swimming in this water”
Now Make a FisDucKen class as child class that inherent all three classes created earlier. Create a object
for this class and called different member functions from parent class.
● Did you observe any conflicting function while calling member functions?
● If so, then according to you what could be the solution to resolve this issue.
Task 2:
Design a multimedia player class that can play both audio and video. Create separate
classes for audio Player and video Player and then inherit them into a class for a
multimedia player. the parent and child classes have the following functions
Task 3:
Design a computer class that has various components like CPU, RAM, and Storage. Use
the following methods to assemble a computer with different components.CPU, RAM,
and Storage are classes representing components of a computer.
● Using composition
● Using aggregation