Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Chocolate Delights Candy Company manufactures several types of candy. Design the following, creating a class diagram and pseudocode design: A Candy class containing attributes (data
- Chocolate Delights Candy Company manufactures several types of candy. Design the following, creating a class diagram and pseudocode design:
- A Candy class containing attributes (data members) for the price per pound, and the number of pounds sold in the average month. Include a default constructor that initializes each attribute to some reasonable value. Include a second constructor that initializes each attribute to a value provided when an object is instantiated. Also include accessor and mutator methods for each attribute.
- Add a method to the class that displays the objects data members (attributes) only if it is a best-selling item. Best-selling items are those that sell more than 2,000 pounds per month. (Be sure to define and use a constant for the 2000 pounds per month.)
- Add a method to the class that displays the objects data members only if it is a lowpriced item. Low-priced items are those that sell for $3 per pound or less. (Be sure to define and use a constant for the $3 per pound amount.)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started