Program for randomly generated 3- digit number matches, JAVA Programming

Assignment Help:

Program for Randomly Generated 3- Digit Number Matches

This assignment demonstrates your ability to use basic Java syntax including selection and looping statements. You will need to write a Java application that determines how often a randomly generated 3- digit number matches your favorite 3-digit number. For example, suppose your favorite number is 777, if the computer generated a 3-digit number 1 million times, how often would it pick 777?

Requirements:

There are several requirements for this assignment. Review each requirement before you prepare your solution:

1. Write a Java application called LotteryPick3 that will use an Input Dialog to prompt a user for their lucky 3-digit number and the number of times they would like the simulation to run.

2. You should use input validation to ensure a 3 digit integers was entered and the number of times they want the loop to run is between 1000 and 10 million. Error messages for improper/invalid input should be accompanied by a Dialog message explaining the issue and asking for a re-entry of the invalid data.

3. You will then write the code that generates a random 3-digit number and determines if it matches the lucky number. You will execute the loop the number of times the specified by the user in the input dialog prompt.

4. The simulation should keep track of the number of times the random number matches the lucky number.

5. The program should output using a Dialog box providing the input data as well as the number of times the lucky number was matched.

6. Both programs should compile and run without error.

7. Be sure to test your program carefully. Provide a list of comprehensive test cases used to validate your application.

Deliverables:

You should submit your LotteryPick3.java file in the WebTycho assignments folder prior to the due date of listed in the syllabus. Also, include your test cases used to validate your formulas and the results of your tests in a neatly, organized word document. You should name the word document firstinitiallastnamehw2.doc. (e.g., I would submit jrobertsonhw2.doc)


Related Discussions:- Program for randomly generated 3- digit number matches

What is role of action class, An Action Class performs a role of an adapter...

An Action Class performs a role of an adapter among the contents of an incoming HTTP request and the corresponding business logic that should be implemented to process this request

Android app for username and password, Hi, I have an android sdk assignment...

Hi, I have an android sdk assignment which is due monday night. The user will enter the following information. url address www.google.com user name [email protected] password 12

Algorithms, COMPSCI220S2C2012 Assignment 1 due 8 August 8:30 pm This assign...

COMPSCI220S2C2012 Assignment 1 due 8 August 8:30 pm This assignment introduces you to an example of applied algorithm analysis and shows you why, sometimes, compromises in an algor

Explain the user defined exceptions, Explain the user defined Exceptions. ...

Explain the user defined Exceptions. User Defined Exceptions are the exceptions which are defined by user for specific purposed. This enables custom exceptions to be generated

Explain role of actionservlet , ActionServlet performs the role of Contro...

ActionServlet performs the role of Controller: ? Process user requests ? Verify what the user is trying to achieve according to the request ? Pull data from the model (if

Javaserver faces event and listener model, What is JavaServer Faces event a...

What is JavaServer Faces event and listener model? Ans) A mechanism for verifying how events emitted by JavaServer Faces UI components are handled. This model is based on the Ja

Java , Create an object model for the Solar System using the following link...

Create an object model for the Solar System using the following link: Provide">http://airandspace.si.edu/etp/ss/index.htm Provide an abstract class called Planet and a concrete s

Relate in brief - microsoft vs java, Relate in brief - Microsoft vs Java ...

Relate in brief - Microsoft vs Java Microsoft hates Java, as a Java program (portable) isn't tied to any particular operating system. If Java is popular, then programs written

Describe the ? operator in java langauge, Describe The ? operator in Java l...

Describe The ? operator in Java langauge? The conditional operator just works for assigning a value to a variable, using a value within a method invocation, or in a few other w

How polylines draws in java language, How Polylines draws in java language?...

How Polylines draws in java language? Java automatically closes the polygons it draws. That is it draws polygons which look like the one on the right rather than the one on the

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd