Question: using c++ please Q1: Write a class named Employee that has the follewing member variables: - name: A string that bolds the employee's aame. -

Q1: Write a class named Employee that has the follewing member variables: - name: A string that bolds the employee's aame. - IdNumber: An int variabie that holds the enployee's ID number. - department: A string that holds the name of the department where the employee works. - position: A string that holds the employee's job vite. -Write a default constructor that assigns empty strings to the name, department, and position member variables, and 0 to the idNumber member variable. -Write appropriate mutator functions that store values in these member variables and accessors functions that return the values in these member variables. One you have written the class, write a separate program that creates three Employees objects to hold the following data: The program should store this data in the three objects asing mutators fyou tan ark the user to enter data) and then display the data for each employee on the screen using accessors. Write a class namad Coin. The Coin ciass thould have the folowing member wariables: A soring named sidetp. The sidetp member variable will hoid either "heads" or "tais" indicatine the side of the eain that is lacing up The cein ciast shauld have the for cwing mamber functions: A default constructor that randomly determines the side of the cain that is tading up ('Reads" of "tals") and inizlalies the sideUp member varlabies accordingly. A void member function named tost that smulates the tossing of the coir. When the toss function is calied, it randomy determines the side of the cain that is facing ug "'heads" or "tails" and sets the sideUp member variables accordingly- A member function hamed getsideup that returnt the valup of the sideup member varables Wite a program that demonstrates the Coin class. The program should create an instance af the class and tisplay the side that is initialy facing up. Thef, we a loop to toss the cein 20 times, Each the the coin is tossed, diglay the side that is farite in. The program shbuld weep count of the number of times heads is tecke uf and the number of times tais is tacirg up and soplay those values efter the bop finipes
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
