Create a class Candy with the following data: weight of one candy bag, price of one candy bag.
There are three types of candy in the store. Find the weight and price of heaviest candy bag. What is
the price of 1 candy bag with minimum weight?
Extend the class Candy with variable to store sales quantity data. Create a class Gourmand with
variables to store the following data: amount of money in litas (Lt) and cents. Which candies (at least
one bag) can a gourmand buy if he need any of the candy type.
Extend the class Gourmand with Set()method which would allow to change gourmands amount of
money. Which of candies can a gourmand buy if his amount of money increases twice?
All 3 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.