ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 29 May 2017 My Price 11.00

score.txt

Hi, I have to write a C++ program using txt file, and I really need some help.


score.txt is givien, with each line containing 3 test scores of each students.
Bob 66 55 60.5
Robby 46 32 98
Anne 83 45.5 50

Student names should be stored in an array of strings, and their marks should be in a 2D array.

I can select two options, 1 or 2, and each option should perform different tasks.

 

Option 1:

I should write a program to sort the records in ascending order of the column number I input, and output the results as a table. 0 is student name, 1, 2, 3, 4 each represent test 1, 2, 3, and 4.

 

For example, if I type 0, it should print a table like this:

Anne      83      45.5    50

Bob        66      55       60.5

Robby    46     32        98

if I type 2, then it should be like:

Robby    46     32        98

Anne      83      45.5    50

Bob        66      55       60.5

 

Option 2:

I should be able to update the score, and write the updated score table sorted by student name to file new.txt.

I should input student name, test number, and change the score.

 

For example, if I type like this:

Name: Anne

Test: 3

New mark: 100

 

then new.txt should be:

Anne      83      45.5    100

Bob        66      55       60.5

Robby    46     32        98

I just started to learn C++, so I really need help.

Thanks.

 

Bob 66 55 60.5Robby 46 32 98Anne 83 45.5 50

Attachments:

Answers

(11)
Status NEW Posted 29 May 2017 03:05 AM My Price 11.00

-----------

Not Rated(0)