1) Create a class called CustomerLister with a main method that instantiates an array of String objects called customerName. The array should have room for five String objects. Use an initializer list to put the following names into the array:
Print the array of names using an enhanced for loop.
2) Replace the enhanced for loop in part 1 by a standard for loop to print the customer names.
3) Create a second double array called customerBalance in the main method. Allow room for five customer balances, each stored as a double. Add a loop that prompts the user with each customer name in order to enter a balance for that customer. Read the keyboard input with a Scanner object. Use the following balances for the input:
After all the balances have been entered, print out each customer and his/her balance.
You'll get 1 file (1.4KB)