Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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? image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Upgrading Oracle Databases Oracle Database New Features

Authors: Charles Kim, Gary Gordhamer, Sean Scott

1st Edition

B0BL12WFP6, 979-8359657501

More Books

Students also viewed these Databases questions

Question

Create a Fishbone diagram with the problem being coal "mine safety

Answered: 1 week ago

Question

5. Understand how cultural values influence conflict behavior.

Answered: 1 week ago

Question

e. What do you know about your ethnic background?

Answered: 1 week ago