2-We must calculate the banana price by supplying both how many KGs of bananas we are adding to the cart, and the price per KG in the constructor. The getCost() method will return the total cost based on these two values.
3- Lemon: This class also inherits from Fruit. You must supply a price per lemon and how many lemons we are adding through the constructor. The getCost() method will just return the cost of all the lemons.
The answer to the question is available in the PDF file https://www.assignmentexpert.com/https://www.assignmentexpert.com/homework-answers/programming-answer-59370.pdf
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment