[Solved] SOLVED:Lab-6-Using-Arrays-with-Methods

30 $

File Name: SOLVED:Lab-6-Using-Arrays-with-Methods.zip
File Size: 357.96 KB

SKU: [Solved] SOLVED:Lab-6-Using-Arrays-with-Methods Category: Tag:

Or Upload Your Assignment Here:


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:

CathyBenJorgeWandaFreddie

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:

100.00234.562.4932.32400.00

After all the balances have been entered, print out each customer and his/her balance.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] SOLVED:Lab-6-Using-Arrays-with-Methods
30 $