*JAVA* *PLEASE INCLUDE NOTES* NYS Win 4 Lottery Class Attributes: name: \"NYS Wi
ID: 3713861 • Letter: #
Question
*JAVA* *PLEASE INCLUDE NOTES*
NYS Win 4 Lottery Class Attributes:
name: "NYS Win 4"
gameTime: which may either Midday or Evening
wagerAmt: which may be $ .50 or $1.00
number: an integer value 0000 - 9999
For this assignment you are to develop both an uml diagram and the corresponding java class for a New York State Win 4 lottery ticket (ie. one instance of this object correlates to one NYS Win 4 Lottery ticket). The actual ticket rules have been simplified to take some of the complexity out of it.
Your java class will have the following:
1. a name attribute (name of the ticket "NYS Win 4"),
2. a gameTime attribute which can only have one of two values "Midday" or "Evening",
3. a wagerAmt attribute which can only have one of two values .50 or 1.00,
4. a number attribute which can contain an integer value between 0000 - 9999
5. either a default constructor or an overloaded constructor or both
6. both the getter, setter methods for each of the attributes
7. a quickDraw method which uses the Random class to generate and assign the value for the number attribute
8. a toString method
9. include a main method with your class that instantiates 3 NYS Win 4 objects and output their contents calling their toString() method.
Explanation / Answer
Hi Dear,
Please find my implementation.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.