J. Crew is having a sale that allows the customer, if they buy 3 or more items, to receive the lowest

J. Crew is having a sale that allows the customer, if they buy 3 or

more items, to receive the lowest priced item for free. The
management at J. Crew asks you to write a program that will
calculate the customer’s bill during this promotion.
Write a program that:
1. Prompts the clerk for the number of items the customer is
purchasing and collects each item’s price into an array.
2. Passes the array to a method that calculates the total price of
all of the amounts in the array.
3. Passes the array into a getLowest method to determine the
item with the lowest price.
4. Calls a getSales method that returns the total amount of the
customer’s sale, including the discount, if applicable. Of
course, this method SHOULD NOT subtract out the lowest
item’s amount if the customer did not purchase 3 or more
items.
5. Displays the number of items purchased, the price of each,
the discount amount (if applicable) and the customer’s total.

Leave a Reply

Your email address will not be published. Required fields are marked *