Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a well-documented (commented) program in Java, Average, that reads in lines from standard input with each line containing a name and three integers and

Write a well-documented (commented) program in Java, "Average," that reads in lines from standard input with each line containing a name and three integers and then uses "printf()" to print a table with a column of the names, the integers, and the average of the three integers accurate to two decimal places. The user will specify the number of names as a command-line argument and then type in that number of names (along with three integers for each name).

A sample run would be as follows.

> java Average 4

Joe 3 5 2

Tim 4 1 5

Jane 6 3 2

Jack 8 3 5

Joe 3 5 2 3.33

Tim 4 1 5 3.33

Jane 6 3 2 3.67

Jack 8 3 5 5.33

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

Database Systems Introduction To Databases And Data Warehouses

Authors: Nenad Jukic, Susan Vrbsky, Svetlozar Nestorov

1st Edition

1943153191, 978-1943153190

More Books

Students also viewed these Databases questions