Trusted by Students Everywhere
Why Choose Us?
0% AI Guarantee

Human-written only.

24/7 Support

Anytime, anywhere.

Plagiarism Free

100% Original.

Expert Tutors

Masters & PhDs.

100% Confidential

Your privacy matters.

On-Time Delivery

Never miss a deadline.

Sale-Receipt: Write a java program that specifies four parallel one dimensional arrays to   store the product name, quantity and cost plus ItemTotal

Computer Science Jun 26, 2020

Sale-Receipt: Write a java program that specifies four parallel one dimensional arrays to  

store the product name, quantity and cost plus ItemTotal. Each array should be capable of  

holding a number elements provided by user input. Using a for loop input values for length  

and width arrays. The entries in the area arrays should be the corresponding values for the  

product, which is to be used to calculate the costs as follows (thus, itemTotat[i] = quantity

[i]* cost [i]) after data has been entered display the following receipt as output:

Product Quantity Cost Total

---------- ----------- ------- --------

Banana 4 2.65 10.60

coke 1 9.18 9.18

Sub-Total 19.78

VAT(15%) 2.97

TOTAL N$ 22.75

ample Run1

Enter the number of products: 2

Enter product 1 name, Qty and Cost: Banana 4 2.65

Enter product 1 name, Qty and Cost: Coke 1 9.18

Output1:

Product Quantity Cost Total

---------- ----------- ------- --------

Banana 4 2.65 10.60

coke 1 9.18 9.18

Sub-Total 19.78

VAT(15%) 2.97

TOTAL N$ 22.75

Expert Solution

For detailed step-by-step solution, place custom order now.
Need this Answer?

This solution is not in the archive yet. Hire an expert to solve it for you.

Get a Quote
Secure Payment