Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

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 Ticket

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database Administration The Essential Reference

Authors: Brian Laskey, David Kreines

1st Edition

1565925165, 978-1565925168

Students also viewed these Databases questions

Question

Explain which compound has the higher boiling point. Discuss.

Answered: 1 week ago