Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write java programs The Lottery Ticket Checker Your Lottery checker program should ask the user to input a file (you can have it have a

Write java programs

The Lottery Ticket Checker

Your Lottery checker program should ask the user to input a file (you can have it have a GUI to ask the user to input a file by clicking a button or you can just bring up the file chooser right away) The ticket checker will read in the file you created in part 1 and check it against a predetermined set of winning numbers. The way it should do this is that it should have a ticket class that extends the comparable type (this can be the same class from part 1 if you do it right). Your program should create two instances of ticket, one with the numbers that were read in from the file selected and one with the winning numbers, and you should do a compare between these two objects. If the ticket numbers read in from the file match the winning tickets you should use your artistic graphic abilities to draw a winning message to the user telling them they won the jackpot. The graphic should use at least 3 different shapes and have an appropriate message. If the user does not have a winning ticket you should draw a losing message using at least 3 different shapes with an appropriate message, something like the below:

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.

Lottery Checker YOU WON THE JACKPOT!I! CONGRATS!!! Lottery Checker You didn't win, better luck next time Lottery Checker YOU WON THE JACKPOT!I! CONGRATS!!! Lottery Checker You didn't win, better luck next time

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

Step: 3

blur-text-image

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

Relational Database Design With Microcomputer Applications

Authors: Glenn A. Jackson

1st Edition

0137718411, 978-0137718412

More Books

Students also viewed these Databases questions

Question

c. What were you expected to do when you grew up?

Answered: 1 week ago

Question

4. Describe how cultural values influence communication.

Answered: 1 week ago

Question

3. Identify and describe nine cultural value orientations.

Answered: 1 week ago