Question: In C + + language for object oriented programming: Q 1 . Write a class Employee that contains attributes of employee id and his scale.
In C language for object oriented programming:
Q Write a class Employee that contains attributes of employee id and his scale. The class contains member functions to input and show the attribute. Write a child class Manager that inherits Employee class. The child class has attributes of manager id and his department. It also contains the member functions to input and show its attributes. Also create constructors and destructors of both the classes. Write a main function to test this class.
Q Create a class called Point that has two data members: and coordinates of the point. Provide a noargument and a argument constructor. Provide separate get and set functions for the each of the data members ie getX, getY, setX, setY. The getter functions should return the corresponding values to the calling function. Provide a display method to display the point in format.
Derive a class Circle from this Point class that has an additional data member: radius of the circle. The point from which this circle is derived represents the center of circle. Provide a noargument constructor to initialize the radius and center coordinates to Provide a argument constructor: one argument to initialize the radius of circle and the other argument to initialize the center of circle provide an object of point class in the second argument Provide a argument constructor that takes three floats to initialize the radius, and coordinates of the circle. Provide setter and getter functions for radius of the circle. Provide two functions to determine the radius and circumference of the circle. Write a main function to test this class.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
