Write a program, BytePe1.java, that reads a binary file ClassList.dat, calculating the grades and prints the results. The file layout is as follows: Binary data file contains: Data type Data item UTF Student Name Student number integer double Grade in class 1 double Grade in class 2 double Grade in class 3 double Grade in class 4 Requirements: Read the binary data file not knowing how many records are in the file. Compute the average of grades, and print the average as the last column of the data read. There are three examples shown. However, the data file contains more data than shown. Do not program for only three people. The program must handle all the data, and terminate without errors. Use the printf method for formatting. Make sure your headings, and column output matches exactly. Blank spacing between columns does not have to match exactly. Partial sample of the output: ID Gradel Grade2 Grade3 Grade4 Avg. 93.3 Name Kathryn Morris 193038393 93.2 94.3 89.0 96.5 John Finn 394720953 89.5 92.7 77.8 96.5 89.1 Jeremy Ratchford 252648093 75.6 88.5 67.0 98.3 82.4

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Subject: Java Programming

Write a program, BytePe1.java, that reads a binary file ClassList.dat,
calculating the grades and prints the results. The file layout is as
follows:
Binary data file contains:
Data type
Data item
UTF
Student Name
integer
double
Student number
Grade in class 1
double
Grade in class 2
double
Grade in class 3
double
Grade in class 4
Requirements:
Read the binary data file not knowing how many records are in the file.
Compute the average of grades, and print the average as the last
column of the data read.
There are three examples shown. However, the data file contains
more data than shown. Do not program for only three people. The
program must handle all the data, and terminate without errors.
Use the printf method for formatting. Make sure your headings, and
column output matches exactly. Blank spacing between columns does
not have to match exactly.
Partial sample of the output:
Name
ID Gradel Grade2 Grade3 Grade4
Avg.
Kathryn Morris
193038393
93.2
94.3
89.0
96.5
93.3
John Finn
394720953
89.5
92.7
77.8
96.5
89.1
Jeremy Ratchford
252648093
75.6
88.5
67.0
98.3
82.4
Transcribed Image Text:Write a program, BytePe1.java, that reads a binary file ClassList.dat, calculating the grades and prints the results. The file layout is as follows: Binary data file contains: Data type Data item UTF Student Name integer double Student number Grade in class 1 double Grade in class 2 double Grade in class 3 double Grade in class 4 Requirements: Read the binary data file not knowing how many records are in the file. Compute the average of grades, and print the average as the last column of the data read. There are three examples shown. However, the data file contains more data than shown. Do not program for only three people. The program must handle all the data, and terminate without errors. Use the printf method for formatting. Make sure your headings, and column output matches exactly. Blank spacing between columns does not have to match exactly. Partial sample of the output: Name ID Gradel Grade2 Grade3 Grade4 Avg. Kathryn Morris 193038393 93.2 94.3 89.0 96.5 93.3 John Finn 394720953 89.5 92.7 77.8 96.5 89.1 Jeremy Ratchford 252648093 75.6 88.5 67.0 98.3 82.4
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY