Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Read input,but got error

 
Jeannie Kaw
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
3.......................................
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"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Thanks,
Cindy
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So - what was the error?
 
Irene Loos
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeannie:
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.
Jamie
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic