Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In java, 1 . Create a method that will be used to test an IQ . This method will receive a String and a Random

In java,
1. Create a method that will be used to test an IQ. This method will receive a String and a Random object when called (an object of type Random), and return an int. In this method you will: create a new Scanner object, say hi to the user by name, get 2 random numbers between 7 and 133, and ask the user what the sum of the 2 numbers is. If the user is correct, display "Great Job!" and then assign IQ the value of 93 plus the sum of the 2 numbers. If the user is incorrect, say "No, the answer was...", display the answer, and assign IQ the value of 35 plus the sum of the 2 numbers. Return IQ.
2. When the user enters 2, back in the main method, call the method you created in #7, send the user's name and the random object you created as arguments to the method. Display the returned value as the user's IQ.
3. Create a method that will be used to create a table. This method will receive a String when called and will not return anything. In this method you will: create a new Scanner object, prompt the user (using their name) for a letter, prompt the user for a number from 4 to 13(n), make sure the number is not less than 4 or greater than 13 IN ONE STATEMENT, if number is less than 4 or greater than 13 set it to 13, use for loops to display an n x n grid of the letter entered
4. When the user enters 3, back in the main method, call the method you created in #9, send the user's name as an argument to the method.

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

Time Series Databases New Ways To Store And Access Data

Authors: Ted Dunning, Ellen Friedman

1st Edition

1491914726, 978-1491914724

Students also viewed these Databases questions