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
o total as static integer to show total number of employees
o Set the initial value of total equals to
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 getdata functions to get name with spaces from user.
Hint: use cin.getlinearrayname, size
Make void showdata function to display id and name on screen.
Make static void showtotal to show total number of employees.
Make main function
o Call showtotal using class name.
o Make an Employee Object by name and get data from user
using keyboard.
o Call showtotal using class name.
o Now Make an Employee Object Dynamically using Employee
pointer.
o Call showtotal
o Destroy the this employee object.
o Again call showtotal using class name.
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
