Question: create a c + + program Make an Employee class. It has two attributes o id as unsigned int o name as a character array

create a c++ program Make an Employee class.
It has two attributes
o id as unsigned int
o name as a character array of size 100.
o total as static integer to show total number of employees
o Set the initial value of total equals to 0.
Make no argument constructor
o Increment total.
o Set id equals to total and name equals to empty sting.
Make a destructor and decrement total inside the destructor.
Also, show id and name of the Employee object that is being
destroyed.
Make void get_data() functions to get name with spaces from user.
Hint: use cin.getline(array_name, size).
Make void show_data() function to display id and name on screen.
Make static void show_total() to show total number of employees.
Make main() function
o Call show_total() using class name.
o Make an Employee Object by name and get data from user
using keyboard.
o Call show_total() using class name.
o Now Make an Employee Object Dynamically using Employee
pointer.
o Call show_total()
o Destroy the this employee object.
o Again call show_total() using class name.

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!