Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java Write a program that reads in lines from standard input, StdIn , with each line containing a name and three test scores, and then

Java

Write a program that reads in lines from standard input, StdIn, with each line containing a name and three test scores, and then uses the printf() method in StdOut to print a table with a column of the names of the integers in the result of dividing the first by the second accurate to three decimal places. You should use a program like this to tabulate batting, averages for baseball players or grades for students.

To access the StdOut class and other classes in algs4.jar Download algs4.jar, you will need to do the following:

Download the algs4.jar Download algs4.jarfile to a folder. The folder should be dedicated to Java libraries for this course

To add algs4.jar to your VS Code project:

In your VS Code window, go to Java Project, then Referenced Library and select algs4.jar from the folder where you placed it.

In your Java program add the import statements as shown below:

import edu.princeton.cs.algs4.StdOut;

Do NOT use System.out.println() to output your results.

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

T Sql Fundamentals

Authors: Itzik Ben Gan

4th Edition

0138102104, 978-0138102104

More Books

Students also viewed these Databases questions