Question: a) Define a class named Customer that holds private fields for a customer ID number, last name, first name, and credit limit. Include four public
a) Define a class named Customer that holds private fields for a customer ID number, last name, first name, and credit limit. Include four public functions that each set one of the four fields. Do not allow any credit limit over $10,000. Include a public function that displays a Customers data. Write a main() function in which you declare a Customer, set the Customers fields, and display the results. Save the file as Customer.java.
b) Write a main() function that declares an array of five Customer objects. Prompt the user for values for each Customer, and display all five Customer objects. Save the file as Customer2.java.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
