subject

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. Use a class Item to describe an item, with any needed methods and a constructor public Item(double price, boolean isPet, int quantity) An invoice holds a collection of Item objects; use an array list to store them. In the Invoice class, implement methods public void add(Item anItem), public double getDiscount() Write a program that prompts a cashier to enter each price and quantity, and then a Y for a pet or N for another item. Use a price of –1 as a sentinel. In the loop, call the add method; after the loop, call the getDiscount method and display the returned value. Submit java files and output screenshot.

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 03:30, natalie2sheffield
Hashtags serve to identify the topic of a given tweet true false
Answers: 2
image
Computers and Technology, 23.06.2019 23:30, huangjianhe135
The keyboard usually has six rows of keys. which of the following is not one of the key group categories? letter keys number keys control keys graphic keys
Answers: 1
image
Computers and Technology, 24.06.2019 16:00, kamo90
How are roger williams, james oglethorpe, and william penn similar?
Answers: 3
image
Computers and Technology, 24.06.2019 17:40, penacesar18p9jrdh
The value of sin(x) (in radians) can be approximated by the alternating infinite series create a function (prob3_2) that takes inputs of a scalar angle measure (in radians) and the number of approximation terms, n, and estimates sin(x). do not use the sin function in your solution. you may use the factorial function. though this can be done without a loop (more efficiently), your program must use (at least) one. you may find the mod() function useful in solving the problem.
Answers: 1
You know the right answer?
A pet shop wants to give a discount to its clients if they buy one or more pets and at least five ot...

Questions in other subjects:

Konu
Mathematics, 23.04.2020 23:04
Konu
Biology, 23.04.2020 23:04
Konu
Mathematics, 23.04.2020 23:04