JAVA Homework 6

User Generated

FZFN3

Programming

Description

JAVA Homework 6

  • Due Monday by 11:59pm
  • Points 20
  • Submitting a file upload
  • File Types java

Do Business P6.29 on page 312 of your textbook

Unformatted Attachment Preview

32 .. Business P6.29 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. . Implement a method public static void discount(double[] prices, boolean[] is Pet, int nItems) 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.
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Here ...


Anonymous
Great! 10/10 would recommend using Studypool to help you study.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Related Tags