Question: C++ plz! :) Construct a customer class that keeps track of a Customer purchases, credit line, and total balance. An object in the customer class

C++ plz! :)

C++ plz! :) Construct a customer class that keeps track of aCustomer purchases, credit line, and total balance. An object in the customerclass will have a name, an address, a credit limit (set to

Construct a customer class that keeps track of a Customer purchases, credit line, and total balance. An object in the customer class will have a name, an address, a credit limit (set to $1500) as well as other data fields. Declare and define data fields, include a constructor to populate the data fields, and implement member functions such that you can perform the following: Extract data members if needed. Keep track of number of sales, and total balance. Specify if a new purchase would exceed the credit limit. If the cost of an item to be purchased, added to the unpaid balance, surpasses the Customer's credit limit, do not allow the sale and output "Not enough credit limit. Purchase cannot be completed Otherwise show "Purchase successful." Write a program that tests the features of the customer class. Figure 1 shows a sample output. You can use the following pseudocode as a template #include header files using namespace std; class customer public: Customer (parameters) string get-name C) const double get-credit-limit const bool add-purchase (double val double get-total-balance const int get-num-purchases C) const private: data field Definition of constructor and member functions

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!