[Solved] : Question 130509

Write a class called Product. The class should have fields called name, stock-items, and
price, holding the product’s name, the number of items of that product in stock, and the regular
price of the product. There should be a method get_price that receives the number of items to be
bought and returns the cost of buying that many items, where the regular price is charged for orders
of less than 10 items. There should also be a method called make_purchase that receives the
number of items to be bought and returns the decreased amount by that much. As a 10% discount
is applied for orders of between 10 and 99 items, and a 20% discount is applied for orders of 100
or more items.


Expert Answer


Answer to : Question 130509

Leave a Comment

About

We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us

× How can I help you?