This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Java in General and the fly likes Read input,but got error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Read input,but got error" Watch "Read input,but got error" New topic

Read input,but got error

Jeannie Kaw

Joined: Apr 30, 2002
Posts: 5
If I want to design an interface/Application which will perform the following functions:
Create a record contains 15 students and read the input from user.
1) We are free invited to enter the details of a Student with the name,
and enter the 3 Marks obtained in each 3 subjects.(like..Integer.parseInt(input);read their input
2) Calculate the average test score of each student.
3) Display the name of the student and test score according to their grade esTination, Credit, Pass
or Failed.
Fail=less than 40
Pass=less than 60 more than 40
Credit=Less than 70 more than 60
Destination=More than 70
4) Calculate and display the highest and lowest average score.
5) Develop in Application and print out the input from what user entered.
The report program should display in this format.
Roger Investigation Company
S.No Name of Student Marks in 3 subject Average Grade
Mark1 Mark2 Mark3
1. Mayer 65 79 24 56 PASS
2. Raite 55 78 69 67.33 CREDIT
4. .....................................
till 15 students.
Highest Average = 67
Lowest Average = 56

(edited by Cindy to format code)
[ April 30, 2002: Message edited by: Cindy Glass ]
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
Please change your name to be compliant with JavaRanch's naming policy.
Your displayed name should be 2 separate names with more than 1 letter each. We really would prefer that you use your REAL name.

"JavaRanch, where the deer and the Certified play" - David O'Meara
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
So - what was the error?
Irene Loos
Ranch Hand

Joined: Apr 15, 2002
Posts: 78
Hello Jeannie,
I just glance over your code but did not run it. Try to create another array of mark scores for each students[i] entry and put student scores in this array. You will have an array within array.

Irene Loos
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

Most of us help out in more than one forum. when you post the same topic multiple times in different forums, it can be confusing as to which one to give a response. It is better for those helping you if you choose the most appropriate forum to post a problem. Please help Jeannie here instead of at this topic.
I agree. Here's the link:
subject: Read input,but got error
It's not a secret anymore!