Question
Write java programs The Lottery Ticket Printer Your lottery ticket printer program should implement an abstract class called ticket (you will write this class). This
Write java programs
The Lottery Ticket Printer Your lottery ticket printer program should implement an abstract class called ticket (you will write this class). This class should contain all of the private variables that will store the values of the lottery ticket. It should also contain all the appropriate set and get functions for these variables, as well as any helper functions. Your program should implement a GUI. The GUI should allow the user to enter 6 numbers (you can use text fields for these) Something similar to the functionality of this, but feel free to modify it if you feel like you can make it more user friendly.
The program should check to make sure that the user not only entered valid integers between 1-49, but also that each number is UNIQUE. It should do this by throwing exceptions if the user didnt put in a proper value in the field, or if they tried to pick the same number twice. If the user entered valid input it should then save the numbers in a file called ticket.txt which will contain the numbers the user picked.
Notes: ? You can structure the file however you like, but it just needs to store the numbers ? as previously stated if you know how you can make them one project or you can submit these as two different java application projects. ? You can change the game around a little bit if 6 numbers is too ambitious (pick 3), the main point is that I want you to be able to write and check if they won or not.
you leel Tke you call laKe Il IIIore sel heid Lottery Program Welcome to the lottery program! Number 1 Number 2 Number 3 Number 4 Number 5 Number 6 15 16 23 42 Print TicketStep 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