Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

it's Java language . Please give me full code with following results. Thanks Generate a class called BigOrSmall and create a main method in this

image text in transcribed

it's Java language . Please give me full code with following results. Thanks

Generate a class called BigOrSmall and create a main method in this class. Inside the main method follows these stesp: 1. Generate a random whole number between 1(exclusive) and 5 (inclusive) by using the random method found in Math class and store it in a variable called smallRandNum. 2. Print "We will run [value] times!". Where [value] is replaced with the value of smallRandNum. - 3. Execute a for loop, which is the number of iterations of smallRandNum using the generated number. 4. In each iteration of the for loop, use the random method of the Math class to make a random whole number from 1 (exclusive) to 20 (inclusive), and store it to a variable. 5. Print out "The value is: (value)" (replace the value in bracketed section with the generated value). 6. If the number is greater than 10, it prints out "Yay!"4 7. Otherwise, it print out Nay!. Output: - We will run 2 times! The value is :10 Nay! The value is : 114 Yay

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

Pro PowerShell For Database Developers

Authors: Bryan P Cafferky

1st Edition

1484205413, 9781484205419

More Books

Students also viewed these Databases questions