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

Explain the concept of inheritance, Question: (a) (i) Explain the conc...

Question: (a) (i) Explain the concept of inheritance. Illustrate your answer with a suitable Java example. (ii) Java does not support multiple inheritance but does provide

What is render kit in jsf, Component classes generally move the task of gen...

Component classes generally move the task of generating output to the renderer. All JSF components follow it. Render kit is a set of related renderers. javax.faces.render.RenderKit

XML File Homework, I need help on java homework. Is it possible to know the...

I need help on java homework. Is it possible to know the shortest possible time to get the solution before giving my commitment

Write code in a java for automaton distributed in class, Write a code in a ...

Write a code in a c++/java  for the automaton distributed in the class that accepts keywords(cat,bat,cab). Create an input file along with these words may be two or three copies of

Finding highest and lowest numbers, Hi i need help creating a small program...

Hi i need help creating a small program that basically asks the user how many numbers hes going to use and then ask for those numbers and see which is the biggest and the smaller

Inheritance, identify the possible classes and methods in the classes which...

identify the possible classes and methods in the classes which can be used in a sales tracking system for a fast food restaurants

Websphere - weblogic, WebSphere - Weblogic and Apache: Building/Ins...

WebSphere - Weblogic and Apache: Building/Installation  and maintenance of Solaris and Linux machines. Exposure to Sun Hardware : Sunfire v880,v890.V440,X4600

Demonstrate java client and server , There is no separate homework this wee...

There is no separate homework this week, but you may complete the exercises ahead of time, in which case you only need to attend for long enough to get your work marked off by your

Write output for the given code of for loop, What is the output of the foll...

What is the output of the following code: for (i=0; i { document.write("The number is " + i); document.write(" "); } Output The number is 0 The number is 1 The number i

What is a variable in java program, What is a variable in Java program? ...

What is a variable in Java program? It's a memory location. Memory location is given some name. Memory location is being assigned some value. Value may change o

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