Question: Can anybody help me to finish this java work? Thank you so much! Give identifiers semantic meaning and make them easy to read (examples numstudents,
Give identifiers semantic meaning and make them easy to read (examples numstudents, grossPay, etc). User upper case for constants. Use title case (first letter is upper case) for classes. Use lower case with uppercase word separators for all other identifiers (variables Use tabs or spaces to indent code within blocks (code surrounded by braces). This includes classes, methods, and code associated with ifs, switches and loops. Be of spaces or tabs that you use to indent. Use white space to make your program more readable. Part 2: CThere is no part in this assignment Programming 20 points Design a Candy Machine class that can keep track of the type of candies and their quantities. Use the following UML class diagram to design the class CandyMachine. Candy Machine -SELECTION NUM final int- 6 -candy Names stringo -quantities int0 +CandyMachine( +getCandy Name(index int): String +setCandyName(index int, newCandy String): void +get Quantity(index int): int tsetQuantity(index int, numofCandies int) void restock index int, numOfCandies int): void tdecrementQuantity(index int) boolean +total Quantity():int +display Candies(): void +searchindexofCandyName(candyName: String) int Program requirements and/or constraints: You will need to create a file to represent this class CandyMachine,java. The size of the arrays to be used will be 6, and you can use a constant SELECTION NUM to express this. In your class, you declare it as: public class Candy Machine private final int SELECTION NUM
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
