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

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!