***Needs to be written in Java*** Create a console (standaline) application. The program will allow you to select MegaMillion numbers. For the first 5 names, you will be requested to enter a number that is greater than zero and less than 76 since the first 5 numbers on the MegaMillion lottery must be between 1 and 75. Each of the 5 numbers must be different. Program needs to have multiple classes. One class must include the accessor/mutator methods, a readInput() method and a writeOutput() method. Name this first program "MegaMillion.java" The values of the first 5 numbers have to be saved within an array. The 1st element of the array will equal the 1st number enter, the 2nd element of the array will equal the second number entered, etc... However, the number entered is not to be added to the array unless it's both unique from the other numbers enter, and it also falls within the correct range of numbers The second program has to be named "MegaMillionTest.java" and will be responsible for creating a MegaMillion object and invoking the readInput() and writeOutput() methods. Nothing else should be included in this testing class

icon
Related questions
Question
100%

***Needs to be written in Java***

Create a console (standaline) application. The program will allow you to select MegaMillion numbers. For the first 5 names, you will be requested to enter a number that is greater than zero and less than 76 since the first 5 numbers on the MegaMillion lottery must be between 1 and 75. Each of the 5 numbers must be different.

  • Program needs to have multiple classes. One class must include the accessor/mutator methods, a readInput() method and a writeOutput() method. Name this first program "MegaMillion.java"
  • The values of the first 5 numbers have to be saved within an array. The 1st element of the array will equal the 1st number enter, the 2nd element of the array will equal the second number entered, etc... However, the number entered is not to be added to the array unless it's both unique from the other numbers enter, and it also falls within the correct range of numbers
  • The second program has to be named "MegaMillionTest.java" and will be responsible for creating a MegaMillion object and invoking the readInput() and writeOutput() methods. Nothing else should be included in this testing class
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 4 images

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, data-structures-and-algorithms and related others by exploring similar questions and additional content below.