Help With A “discount” Programming Java Code? Please, Help Me!?

A pet shop wants to give a discount to its clients if they buy one or more pets and at least five other items. The discount is equal to 20 percent of the cost of the other items, but not the pets.
The method receives information about a particular sale. For the ith item, prices[i] is the price before any discount, and isPet[i] is true if the item is a pet.
Write a program that prompts a cashier to enter each price and then a Y for a pet or N for another item. Use a price of –1 as a sentinel. Save the inputs in an array. Call the method that you implemented, and display the discount.
*I know this requires implementing this method:
public static void discount(double[] prices, boolean[] isPet, int nItems)
But, I’m having trouble getting started on it for the last 2 hours.
I have searched through the textbook and it’s not giving me a head start.
Can you please at help me getting started on the problem?
I’m willing to work through it and try.

Both comments and pings are currently closed.

Comments are closed.

Powered by WordPress | Designed by: free css template | Thanks to hostgator coupon and web hosting reviews