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, 22.06.2019 17:30
Rachel completed typing an official document with a word processing program. she wants to make sure that her document has no typographical errors. she also wants all headings to have the same font. which features in a word processing program should she use? rachel should use the feature in a word processing program to find typographical errors. she should apply to have uniform headings.
Answers: 1
question
Computers and Technology, 23.06.2019 00:30
Quick pl which one of the following is considered a peripheral? a software b mouse c usb connector d motherboard
Answers: 1
question
Computers and Technology, 23.06.2019 04:31
Which of the following is not a way in which trees benefit the environment? a. they remove a significant amount of carbon dioxide from the atmosphere. b. they remove a significant amount of oxygen from the atmosphere. c. their roots hold soil in place, reducing rates of erosion. d. they remove ozone and particulates from the atmosphere. select the best answer from the choices provided a b c d
Answers: 1
question
Computers and Technology, 23.06.2019 06:00
Respond to the following in three to five sentences. select the workplace skill, habit, or attitude described in this chapter that you believe is most important for being a successful employee.
Answers: 1
You know the right answer?
Consider the following class declaration. Class Customer fails to effectively encapsulate a data mem...
Questions
Questions on the website: 13722367