Question: This assignment relates to the following Course Learning Requirements: CLR 4: Implement inheritance hierarchy and polymorphism where derived classes implement specialized behavior using polymorphic methods.
This assignment relates to the following Course Learning Requirements: CLR 4: Implement inheritance hierarchy and polymorphism where derived classes implement specialized behavior using polymorphic methods. Objective of this Assignment: Ensure students are: Able to solve given programming statements by applying Inheritance Concepts. Able to think the different scenarios and successfully complete the missing programming steps. Pre-Assignment Instructions: To complete this assignment successfully read the module content and follows the given links and given video tutorials to solve the theory and programming questions. Assignment Tasks: Task #1: Create a class with a method that prints "This is parent class" and its subclass with another method that prints "This is child class". Now, create an object for each of the class and call method of parent class by object of parent class method of child class by object of child class method of parent class by object of child class Task #2: Create a class named 'Member' having the following members: Data members: 1. Name 2. Age 3. Phone Number 4. Address 5. Salary It also has a method named 'printSalary' which prints the salary of the members. Two classes 'Employee' and 'Manager' inherits the 'Member' class. The 'Employee' and 'Manager' classes have data members 'specialization' and 'department' respectively. Assign name, age, phone number, address and salary to an employee and a manager by making an object o
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
