Question: PLEASE ANSWER THIS C++ code in steps show the //comments 1. According to the given UML diagram and instructions write C++ code for the following

 PLEASE ANSWER THIS C++ code in steps show the //comments 1.

According to the given UML diagram and instructions write C++ code for

PLEASE ANSWER THIS C++ code in steps show the //comments

1. According to the given UML diagram and instructions write C++ code for the following sections. Cashier name: string total: double noOfCashier: static int Cashier() Cashier(string, double) Cashier(const Cashier&) -Cashier) Getter and Setter methods should be defined for every private data member!!! Use this pointer while defining 'Cashier' class. The Default Constructor o accepts data from keyboard for private data members. Getter methods should return the corresponding data member. Setter methods should receive parameter from main() and change the corresponding data member. Destructor prints an appropriate message on screen when the object is destroyed. Add two functions which will be friend of Cashier class. A function moneyin will receive the amount of money received by the cashier object as a parameter from the main and then adjust the total accordingly (total will be INCREASED, because money is GOING IN). A function moneyout() will receive the amount of money paid out by the cashier object as a parameter from the main and then adjust the total accordingly (total will be DECREASED, because money is GOING OUT). Note that: Initial number of cashier is 0 (zero). citem.cpp Write a main function that will do the following steps. Create two automatic objects that one executes the parameterized constructor and the other one executes the copy constructor. Create a pointer object that executes the default constructor. Create a dynamic object that executes the parameterized constructor Create a dynamic array object that executes the default constructor which holds information for 20 cashier objects. Call related friend function to allow money in for the dynamic object and money out for the first automatic object you have created above. Call the necessary methods to print the details of dynamic array object. Display the number of cashier objects created till now. List down the name of the objects that will be destroyed automatically in a correct order. Make sure that all the objects that are not destroyed automatically are removed from the memory

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!