Question: 1. Create a LottoBin class that has a winBall, a MIN and a MAX (lower limit and upper limit for the winBall's value) This class
1. Create a LottoBin class that has a winBall, a MIN and a MAX (lower limit and upper limit for the winBall's value) This class will need: 1. (data) variable members: winBall, MIN, and MAX Consider: What should their types be? Can/should any of them be final variables ? 2. A constructor that accepts the MIN and the MAX for the winBall's range of values and set's its value to MIN-1 (invalid) before the drawing. 3. Method members: Mutator: pick(): void that randomly assigns a value from the range MIN.. MAX to winBall Accessor: getWinBall(): int that returns a copy of the winBall's value Accessor: toStringl): String that returns a graphic copy of the winBall No getMIN) or getMAX) needed if you make them public final vars! 2. Create class Pick3Lottery that is a pick3 lottery drawing consisting of 3 LottoBins with MIN 0 and MAX 9. 1. data variable members: 3 LottoBins and an enum type for midday or evening 2. a default constructor that intializes the 3 LottoBall objects (ball1, ball2, ball3) 3. Method members > drawlottery() that picks the 3 winning lotto balls from the bin > toString() that announces the date, midday or evening and the winning numbers 3. Class runNJPick3Lottery creates a Pick3Lottery object and calls its drawLottery() method and then prints the object to show the results. Good naming conventions, consistent coding style, and clear documentation are required! Remember that your program should be as easy for another person to read/understand as it is for the computer to execute. Follow the sample programs (Counter, Clock, Player, Die ) JavaDoc commenting and documentation. Part 1 (2.5 points) due 3/5, Program Design: Come prepared for an in- class design review-you will work in small groups with your peers. Bring 2 copies of the following (one for submission) 1. A coded LottoBin.java file with set/get methpds and JavaDodc comments that manages a single LottoBin's operation. 2. A Pick3Lottery.java starter file with good Javadoc comments and pseudo-code. NO SOURCE CODE expected/required/desired!) Completed programming project due 3/12- include the following 1. Storage media containing: zip project 2. Hardcopy of sample output that shows/proves your program works according to specifications! Copy/Paste this into the bottom of the driver file 3. Hardcopy of all source files in the following order (no blank pages!) 1. runNJPick3Lottery (with sample output pasted below the code as comments) 2. class LottoBin class Pick3Lottery with your enum type copy/pasted below the code as comments Sample Output might look like: It's time to play the Pick 3 Lottery! Good Luck! Today's evening Pick 3 winning numbers are: 7 1 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
