subject

Main topics: Basic Java program Programmatic output
Arithmetic Expressions
User input
Program Specification:
Write a Java program that calculates and outputs a baseball pitcher’s ERA in a reasonable report format. "ERA" is an acronym for "earned run average" and is computed using the following equation: number of earned runs multiplied by 9 and divided by number of innings pitched Your program must do the following: • Prompt the user for the first and last name of the pitcher and store them in two variables of type String • Prompt the user for the pitcher’s number of earned runs and store it in a variable of type int • Prompt the user for the pitcher’s number of innings pitched and store it in a variable of type int • Compute and output the pitcher’s ERA, which should be a (double) floating point number Sample run(s): Pitcher’s first name: Josh Pitcher’s last name: Hader Number of earned runs: 22 Number of innings pitched: 81 Josh Hader has an ERA of 2.4444444444444446

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 17:00, silvijaaa
The two main ways in which marketers address the competition with their strategies are by satisfying a need better than a competition and by
Answers: 2
image
Computers and Technology, 23.06.2019 00:30, devenybates
Which one of the following is the most accurate definition of technology? a electronic tools that improve functionality b electronic tools that provide entertainment or practical value c any type of tool that serves a practical function d any type of tool that enhances communication
Answers: 1
image
Computers and Technology, 23.06.2019 04:31, tbt81
Type the correct answer in the box. spell all words correctly. the managing director of a company sends a christmas greeting to all his employees through the company email. which type of network does he use? he uses an
Answers: 1
image
Computers and Technology, 23.06.2019 06:30, Zieken993
Martha is designing a single-player game. her manager suggests that she plan the design to incorporate future modifications. which principle of game design relates to planning for future modifications?
Answers: 1
You know the right answer?
Main topics: Basic Java program Programmatic output
Arithmetic Expressions
User input...

Questions in other subjects:

Konu
Chemistry, 08.01.2021 03:00
Konu
English, 08.01.2021 03:00