Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Task #2 Using the Scanner Class for User Input In this task you will read in the users name, and let the user enter values

Task #2 Using the Scanner Class for User Input

In this task you will read in the users name, and let the user enter values to replace the hard-coded values in Task #1. 1. Add an import statement above the class declaration to make the Scanner class available to your program.

2. In the main method, create a Scanner object and connect it to the System.in object. Reuse this Scanner object to read in each of the following entries. 3. Prompt the user to enter the first score. 4. Read the first score from the keyboard using the nextLine() method, and store it into the variable called score1 (comment out the line that originally defined score1).

5. Prompt the user to enter the second score. 6. Read the second score from the keyboard using the nextLine() method, and store it into the variable called score2 (comment out the line that originally defined score2). 7. Prompt the user to enter another temperature in Celsius after the original temperature conversion is printed out. 8. Read the temperature and print out the result in Fahrenheit. 9. Compile, debug, and run, using other score values as test data. 10. Submit your completed NumericTypes.java to Blackboard (NOT the class file).

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_2

Step: 3

blur-text-image_3

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

Marketing Database Analytics

Authors: Andrew D. Banasiewicz

1st Edition

0415657881, 978-0415657884

More Books

Students also viewed these Databases questions

Question

6. Describe to a manager the different types of distance learning.

Answered: 1 week ago

Question

1. Explain how new technologies are influencing training.

Answered: 1 week ago