Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 2-Byte 10 (40%) Objectives Learn about binary file I/O reading and writing Description: Write a program (no GUI required), CalcAverages.java, that reads a binary

image text in transcribed
Problem 2-Byte 10 (40%) Objectives Learn about binary file I/O reading and writing Description: Write a program (no GUI required), CalcAverages.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 integerStudent number double double double double Grade in class 1 Grade in class 2 Grade in class 3 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 or String.format method for formatting. Make sure your headings, and column output matches exactly Partial sample of the output: ID Grade1 Grade2 Grade3 Grade4 Avg Name Josephyn Brown Fred Brown George Foreman 192837873 98.5 88.9 92.4 91.1 92.7 982883456 72.5 8.4 82.4 91.1 63.6 78374875 72.5 78.4 81.1 75.676.9

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

Sams Teach Yourself Beginning Databases In 24 Hours

Authors: Ryan Stephens, Ron Plew

1st Edition

067232492X, 978-0672324925

More Books

Students also viewed these Databases questions