Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem #1 Design and implement an application file that does the following: uses a 2 dimensional array to represent the marks that the students got

Problem #1

Design and implement an application file that does the following:

uses a 2 dimensional array to represent the marks that the students got on assignments in this course (see sample data and output below)

uses 1 dimensional arrays for the following:

holds the names of the students in the course

holds the average out of 10 for each student in the course

holds the average out of 10 for each assignment

creates 4 methods that perform the following tasks:

reads data from the file students.txt (already created for you). See note below for code that you can use to connect to the file.

calculates the assignment average for each student

calculates the average for each assignment

prints out the results (see the sample output below). If you want help getting the output to line up, use printf (or ask you instructor about printf)

The class size (number of students) and the number of assignments during the term will be the first line of data to read. (number of students first, then number of assignments). The students names will come next, one per line. Finally the assignment marks, one students data per line, will be input.

Input Data (contained in students.txt):

5 4

Joe Smith

Tommy Jones

Sara Lee

Bob Fowler

Jane Doe

8 9 10 4

9 9 8 5

0 10 10 9

10 9 9 0

10 10 10 10

Sample Output:

Student Marks Average

Name out of 10 out of 10

A1 A2 A3 A4

Joe Smith 8 9 10 4 7.75

Tommy Jones 9 9 8 5 7.50

Sara Lee 0 10 10 9 7.25

Bob Fowler 10 9 9 0 7.00

Jane Doe 10 10 10 10 10.00

Average 7.40 9.40 9.40 5.60

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

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

4th Edition

0805360476, 978-0805360479

More Books

Students also viewed these Databases questions

Question

1. Identify the sources for this conflict.

Answered: 1 week ago

Question

3. The group answers the questions.

Answered: 1 week ago