Question: An array containing 9 elements has how many indices? public class PRG215 Week 2( public static void main(Stringl] args) //Create the costs of items to

An array containing 9 elements has how many indices?  An array containing 9 elements has how many indices? public class

public class PRG215 Week 2( public static void main(Stringl] args) //Create the costs of items to be sold double tennisShoeCost-45.89 double shirtCost 25.55 double coatCost 89.99 double beltCost = 15.00; double pantCost 25.99 /Variables to store financial information double totalAmount 0.0 double Lx Rate 0.081; /Display items for sale on the console System.out printIn("The following clothing items are available for purchase:" System.outprintn . Tennis Shoes for S tennisShoeCost "each"): System.out.printIn" 2. Shirts for S"+shirtCost+"each") System.out.println" 3. Coats for $"+coatCost " each") System.out println" 4. Belts for S"-belCost+" per pound") System.out.printIn" 5. Pants for S pantCost+" cach") System.out. printin("); Create a keyboard input object Scanner key board = new Scanner( Sy stem. in Display on the console - ask for the customer's name System.out.print"Please enter your name: "y /Get the customer name from the keyboard and store it in the String onject "cus String customerName - keyboard.nexto: System.out printIn("") Ask the customer for how many items they wish to purchase- going to use this System.out.print"low many of the above items do you wish to purchase? ") Get the number of items from the keyboard int items ToPurchase keyboard.nextimo System.out.printin Display the customers name and the number of items they wish to purhcase on System.out.printinC"Ok, customerName ". you wish to purchase " items To

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!