Java assignment

  1. Write an application that inputs three numbers (integer) from a user. (40 pts) UPLOAD Numbers.java a. display user inputs b. determine and display the number of negative inputs c. determine and display the number of positive inputs d. determine and display the number of zero inputs e. determine and display the number of even inputs f. determine and display the number of odd inputs
  2. Create a class called Customer that includes three private instance variables – a first name (String), a last name (String), and a credit limit (double). (30 pts) UPLOAD Customer.java
  3. 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 Customers’s capabilities. (30 pts) UPLOAD CustomerTest.java

a. Create two Customer objects.

b. Display each customer’s first name, last name, and credit limit. For doubles, display two integers after the decimal point.

c. Then, raise each customer’s credit limit by 20%.

d. Display each customer’s first name, last name, and credit limit again. For doubles, display two integers after the decimal point.

 

Last Updated on February 10, 2019 by EssayPro