Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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.
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
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started