Choose one of the following to develop into a program that an array. Do not use an ArrayList! Once chosen, do the follow
Posted: Sat May 14, 2022 7:44 pm
Choose one of the following to develop into a program that an
array. Do not use an ArrayList! Once chosen, do the following:
The program I chose is:
Sales Receipt Think about the grocery store and how long your
receipt can get! Write a program that allows for a receipt for 100
items. Populate the array with random doubles in a range you find
typical for grocery purchases. Allow for some ‘small’ negative
numbers to represent coupons or deals. Calculate the sum, the sum
of the positive numbers and the sum of the negative numbers.
Calculate 3% sales tax on the positive numbers only. Print a
receipt that includes each value in the array, the positive total,
the most expensive item, the negative total (with a you saved type
statement), the tax, and the total due to be paid to the store.
Test it with random data, only positive numbers and with a small
receipt of numbers you enter.
I need the following for this program done in Java.
UML diagrams of any classes needed, including the one with
main:
Pseudocode of any non-trivial methods in each class (no
pseudocode needed for basic setters and getters or no args
constructors):
White box test plan and results:
array. Do not use an ArrayList! Once chosen, do the following:
The program I chose is:
Sales Receipt Think about the grocery store and how long your
receipt can get! Write a program that allows for a receipt for 100
items. Populate the array with random doubles in a range you find
typical for grocery purchases. Allow for some ‘small’ negative
numbers to represent coupons or deals. Calculate the sum, the sum
of the positive numbers and the sum of the negative numbers.
Calculate 3% sales tax on the positive numbers only. Print a
receipt that includes each value in the array, the positive total,
the most expensive item, the negative total (with a you saved type
statement), the tax, and the total due to be paid to the store.
Test it with random data, only positive numbers and with a small
receipt of numbers you enter.
I need the following for this program done in Java.
UML diagrams of any classes needed, including the one with
main:
Pseudocode of any non-trivial methods in each class (no
pseudocode needed for basic setters and getters or no args
constructors):
White box test plan and results: