Question:

Urgently !!!! please Help my in JAVA?

by  |  earlier

0 LIKES UnLike

Java programming to my school?

now i'm teacher at Sumattha dara Scool in NakornSriThammarat province

in Thailand

i have something to ask everybody here to help please !!!!!!!

JAVA PLEASE !!!!

i have student data in the file as u can see below

Johnson 85 83 77 91 76

Aniston 80 90 95 93 48

Cooper 78 81 11 90 73

Gupta 92 83 30 69 87

Blair 23 45 96 38 59

Clark 60 85 45 39 67

Kennedy 77 31 52 74 83

Bronson 93 94 89 77 97

Sunny 79 85 28 93 82

Smith 85 72 49 75 63

i would like to input this file come to program

and find average grade of five test score

The grade scale is as follows: 90 – 100, A; 80 – 89, B; 70 – 79, C; 60 – 69, D; 0 – 59, F.

and class everage for each test

and output it in a file as follow style

Student Test1 Test2 Test3 Test4 Test5 ... Grade

Johnson 85 83 77 91 76

Aniston 80 90 95 93 48

Cooper 78 81 11 90 73

Gupta 92 83 30 69 87

Blair 23 45 96 38 59

Clark 60 85 45 39 67

Kennedy 77 31 52 74 83

Bronson 93 94 89 77 97

Sunny 79 85 28 93 82

Smith 85 72 49 75 63

Class average

how can i write a program to output like this

i don't know much more in java and i don't have much more time

but i decide if i can find someone that help me to solve this proble

it woul be grateful

moreover this program will use in my class(Now i'm teacher in history class

of public school in thailand that dont have teacher who have computer background) i want to increase efficient of teaching there.

Help me and Help my friend the teching there to have

 Tags:

   Report

2 ANSWERS


  1. Here's some pseudocode to get you started:

    int numberOfStudents = whatever (10 in your example)

    int numberOfTests = whatever (5 in your example)

    int scoreArray[numberOfStudents + 1][numberOfTests] //reserve 0 row for totals

    string nameArray[numberOfStudents + 1]

    nameArray[0] = "Class average"

    for i 1->numberOfStudents {

    display "Enter name of student #" i

    Store name in nameArray[i]

    display "Enter their " numberOfTests " test scores separated by spaces"

    for j 0->numberOfTests-1 {

    parse next int from input string and store in scoreArray[i][j]}

    }

    display report headings

    for i 1->numberOfStudents {computeGrade(i)}

    computeGrade(0)

    void computeGrade(int member) { //all use print instead of println except as noted

    int cumulativeScore = 0

    int averageScore

    char finalGrade

    display nameArray[member] and spacers

    for j 0->numberOfTests-1 {

    if (member>0) {(scoreArray[0][j] =+ scoreArray[member][j]}

    cumulativeScore =+ scoreArray[member][j]

    display scoreArray[member][j] and spacers }

    averageScore = cumulativeScore / numberOfTests //assumes you don't want to round

    if (averageScore < 60) {finalGrade = 'F'}

    else if (averageScore < 70) {finalGrade = 'D'}

    else if (averageScore < 80) {finalGrade = 'C'}

    else if (averageScore < 90) {finalGrade = 'B'}

    else {finalGrade = 'A'}

    display finalGrade // (println)

    }


  2. No one will do your java homework for free.

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions