subject

Consider the following class declaration. Class Customer fails to effectively encapsulate a data member, thereby risking a run-time error due to corrupted data. Using C++, locate the problem(s) and to complete the class to keep track of total year-to-date purchases. If an item to be purchased costs more than the customer’s credit limit, do not allow the sale. Declare and define data fields, accessors, and mutators which will keep track of the total number of sales and total sales for each instance of Customer. Use the filename customer. h, customer. cpp and customerDemo. cpp for your programs. class Customer{public:Customer(string name, string address, string city, string state, string zipcode);void increase_limit(double amount);string get_name() const;string get_address() const;string get_city() const;string get_state() const;double credit_limit;private:string name;string address;string city;string state;string zipcode;}

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 14:00
In which job role will you be creating e-papers, newsletters and preiodicals
Answers: 1
question
Computers and Technology, 23.06.2019 16:30
How to do this programming flowchart?
Answers: 3
question
Computers and Technology, 24.06.2019 03:30
It is not necessary to develop strategies to separate good information and bad information on the internet. true or false
Answers: 1
question
Computers and Technology, 24.06.2019 04:30
Fall protection, confined space entry procedures, controlled noise levels, and protection from chemical hazards are some of the things that contribute to a safe and
Answers: 1
You know the right answer?
Consider the following class declaration. Class Customer fails to effectively encapsulate a data mem...
Questions
question
Mathematics, 03.10.2019 10:30
question
Mathematics, 03.10.2019 10:50
Questions on the website: 13722359