Lab 3 Classes
Lab 3 Classes
Lab#3 Classes
Question:
A. Define a class named Customer that holds private fields for a customer ID number, last
Customer name, first name, and credit limit. Include four public functions that set one of the
four fields. Do not allow any credit limit over JD10,000. Include a public function that displays a
Customer’s data. Write a main() function in which you declare a Customer, set the Customer’s
fields, and display the results. Save the file as Customer.cpp
B. Write a main() function that declares an array of five Customer objects. Prompt the user for
values of each Customer, and display all five Customer objects. Save the file as Customer2.cpp
Solution of Part A: