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:
Q1. 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.
Q2. Create a class called Point that has two data members: x- and y-coordinates of the point. Provide a no-argument and a 2-argument constructor. Provide separate get and set functions for the each of the data members i.e., 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 (x,y) 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 0. Provide a 2-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 3argument constructor that takes three floats to initialize the radius, x-, and y-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.
 In C++ language for object oriented programming: Q1. Write a class

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!