Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Random Chars Program DESCRIPTION: Write a program that asks the user for an int and uses it as a seed for the random number generator.
Random Chars Program DESCRIPTION: Write a program that asks the user for an int and uses it as a seed for the random number generator. Then the program should randomly generate: an uppercase letter a lowercase letter a digit between 0 and 9 SPECIFICATIONS: File name: RandomChars.java The code to complete the task should be in a separate method that is called by the main method Use the ASCII table to determine numeric ranges Hint- the general format for generating a random number in a range is: rand.nextInt( ) + where is the range of values (max - min + 1) and ClowestValue> is the lowest possible number STARTER CODE: // This program asks the user for a seed for the Random number generator. It then generates a random uppercase letter, lowercase letter, and digit. import java.util.Scanner; import java.util. Random; public class RandomChars { public static void main(String[] args) { makeRandoms(); // ask the user for a seed and make all the random things } // this method asks the user for a seed for the random number generator and // then generates a random uppercase char, lowercase char, digit char public static void makeRandoms() { Mill INSERT YOUR CODE BELOW THIS LINE IN } } SAMPLE OUTPUT: ===== Enter a seed for the random number generator: 0 RANDOM: Uppercase Lowercase = 3 Digit = 9 = S ====== Enter a seed for the random number generator: 10 RANDOM: Uppercase = ? Lowercase = 9 Digit = 3 Enter a seed for the random number generator: 33 RANDOM: Uppercase = D Lowercase - Z Digit = 3 ========== Enter a seed for the random number generator: 88 RANDOM: Uppercase = S Lowercase = t Digit = 9
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started