File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Grading Program.....Need help !! Please... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Grading Program.....Need help !! Please..." Watch "Grading Program.....Need help !! Please..." New topic
Author

Grading Program.....Need help !! Please...

Rose Evans
Ranch Hand

Joined: Oct 14, 2004
Posts: 195
OK guys...I'm starting small. This is what I have so far...Take a peak at my code and see if you can give me some advice... The instructions are at the end of the code.



There are two quizzes, each graded on the basis of 10 points.
There is one midterm exam, and one final exam, each graded on the basis of 100 points.
The final exam counts for 50 % of the grade, the midterm counts for 25%, and the two quizzes together count for a total of 25%. (Do not forget to normalize the quiz scores, They should be coverted to percentages before they are averaged in.)

I need to define a class for the student record. The class should have instance variables for the quizzes, miidterm, final, overall numeric score for the course, and final letter grade. The overall numeric score is a number in the range of 0 to 100, which represents the weighted average of the students work. The class should have input and output methods. the input method should not ask for the final numeric grade, nor should it ask for the final letter grade. The class should have methods to compute the overall numeric grade and final letter grade. Thes last two methods will be void methods that set the appropriate instance variables.
________________________________________________________________________

I'd great appreciate any advice.


[ Jess added whitespace and UBB [code] tags to make things easier to read -- check 'em out ]
[ October 31, 2004: Message edited by: Jessica Sant ]

) ) ) )
Jessica Sant
Sheriff

Joined: Oct 17, 2001
Posts: 4313

I'm moving this to the intermediate forum where its more appropriate.
Please post your replies there.

Thanks!
Yi Meng
Ranch Hand

Joined: May 07, 2003
Posts: 270
you must be a C programmer......


Meng Yi
Rose Evans
Ranch Hand

Joined: Oct 14, 2004
Posts: 195
Yi Meng ....Yes I program in C++ as well. How can you tell? Ha.
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
Originally posted by Rose Evans:
Yi Meng ....Yes I program in C++ as well. How can you tell? Ha.

For one thing, all of your code is in main(). Java is very strongly Object Oriented which takes a different style of thinking that the traditional procedural techniques used in beginning C and C++ courses. At the moment, it looks like your program only reads in the scores for a single student and calculates that person's grade.

What if you need to calculate the grades for several students? A typical procedural approach would use a loop of some sort. While this is a valid solution, I think your teacher is trying to get you to think more about Object Oriented Programming techniques. In fact, that's what your final paragraph seems to be saying:
I need to define a class for the student record. The class should have instance variables for the quizzes, miidterm, final, overall numeric score for the course, and final letter grade. The overall numeric score is a number in the range of 0 to 100, which represents the weighted average of the students work. The class should have input and output methods. the input method should not ask for the final numeric grade, nor should it ask for the final letter grade. The class should have methods to compute the overall numeric grade and final letter grade. Thes last two methods will be void methods that set the appropriate instance variables.

This seems to spell out exactly what you need to do from here. Are there any particular parts in this that you don't understand? Why don't you give a shot at creating this student record class and let us know when you get stumped. The more specific your questions are in that regard, the more we will be able to help smooth out some of the bumps for you.

Good luck and keep coding!

Layne


Java API Documentation
The Java Tutorial
Rose Evans
Ranch Hand

Joined: Oct 14, 2004
Posts: 195
Layne,

You're right. My program is all in main, and that is where I get confused. I have the hardest time understanding topics in my class because my teacher, (she tries really hard, but I, and the rest of the class just can't seem to follow her too well).
I just don't know exactly how to write the methods. You're right too, I do need some type of loop that will read several students grades. I just don't know where to begin. My book gives horrible examples.
I just can't quite get the class part down pact. I'll see what I can do and then I'll try to post it.
Thanks so much for your help. You seem very knowledgeable with Java!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Grading Program.....Need help !! Please...