Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a java program that calculates sales price of each item. The sales price is calculated as follows: sales price = original price + (original

Write a java program that calculates sales price of each item. The sales price is calculated as follows:

sales price = original price + (original price x tax)

The tax rate is 5%. The program must design a single dimensional array to save all original price. Then, in Main() method, entire array and tax rate are passed to the static method. The method calculate sale price of each item. Your program must meet following requirements:

1. The program should declare one dimensional array to store original price of each item.

2. The size of an array should be determined by number of items. - it means that this is determined by user.

3. Prompt the user to input original price of each item and save it to the array.

4. The entire array and tax rate pass to the static method you defined.

5. The method calculates sales price of each item using above formula and display it on the screen.image text in transcribed

should look like the picture.

ca C: WINDOWSAsystem32\cmd.exe How many Items do you have? 5 Enter the original price of item 1 $1.99 Enter the original price of item 2 $2.99 $5.50 Enter the original price of item 3 Enter the original price of item 4 $3.55 Enter the original price of item 5 $12.99 Sale Price of item 1 including tax $2.09 ale Price of item 2 including tax $3.14 ale Price of item 3 including tax: $5.78 ale Price of item 4 including tax $3.73 Sale Price of item 5 including tax $11.54 Press any key to continue

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

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 2012 Proceedings Part 2 Lnai 7197

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284892, 978-3642284892

More Books

Students also viewed these Databases questions

Question

1. What are your creative strengths?

Answered: 1 week ago