Question: 1. Create a class called Customer that includes three private instance variables a first name (String), a last name (String), and a credit limit (double).
1. Create a class called Customer that includes three private instance variables a first name (String), a last name (String), and a credit limit (double). UPLOAD Customer.java ,
a. Provide a constructor that initializes these three instance variables. Validate credit limit; it must be greater than 0.0.
b. Provide set and get methods for each instance variable. Validate credit limit; it must be greater than 0.0.
Write a test application named CustomerTest that demonstrates class Customerss capabilities. UPLOAD CustomerTest.java
a. Create two Customer objects.
b. Display each customers first name, last name, and credit limit. For doubles, display two integers after the decimal point.
c. Then, raise each customers credit limit by 20%.
d. Display each customers first name, last name, and credit limit again. For doubles, display two integers after the decimal point.
CAN YOU PLEASE WRITE EVERYTHING CLEARLY AND IN EASY WAY WITH COMMENTS. I AM BEGINNER. THANK YOU
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
