Help coderanch get a
new server
by contributing to the fundraiser

Lucas Stelljes

Greenhorn
+ Follow
since Jan 31, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Lucas Stelljes

I have found out that it's my assignment of "double qualPts = 0" that is resulting in the 0.0 GPA result.

What do I have to do to change this? I thought about creating a "private static double" method, but didn't think it was necessary. Is it, or is something else required?

-Lucas
13 years ago
Thank you for the quick reply.

So this is how I understand your comments: I need to define gpa in more then one place in order for it to "calculate" properly?

Also, I think I found my error. I have qualPts set = 0 at the beginning of the program. During the Loop when I try to calculate qualPts again, I multiply (numgrade + credits)*qualPts. Am I getting a 0.0 for my gpa calculation because it's being multiplied by 0, thus gaining a net result of 0?

Thanks,
-Lucas
13 years ago
Greetings,

I am working on a program to calculate the GPA of a student using a "While" Loop. I have the program written to near completion, and it runs, but I have an error.
Whenever I try to calculate the GPA, no matter how "high" or "low" the student's theoretical GPA should be, it always retains a result of 0.0. I am unable to figure out what I have mistyped/left out.

Can anyone help or suggest anything, or how to refine the program?
Thanks, Lucas

13 years ago
I appreciate all the help guys.

I would LOVE to start at a more simplistic approach to Java. However, being in a college course doesn't really allow that

I configured the program to work perfectly, alot of which came from the help provided here. I will definitely try to contribute things I learn and also seek advice when needed.

Thank you,
-Lucas
13 years ago
Okay, I made corrections that both of you recommended. Thank you.

I have resolved many of the issues but am still having a few errors.

In the lines where I try to calculate the "double totalGradeX" it tells me "Cannot find symbol (method gpaPts(java.lang.String)." I am confused because I thought my gpaPts method outside the "Main() {" function should be called to solve these "double totalGradeX" statements.

My "private static String finalGrades(double gpaPts){" is missing a return statement, but I am unsure of what to place afterwards as an appropriate return.

Lastly, my "private static double gpaPts(String grade){" claims there is a "Class, Interface, or Enum Expected" error. I have looked up how to solve this and reviewed notes I have on this topic, but I don't understand the solution. What am I supposed to type earlier in the program to make this method recognize the code?

Again, let me know if I can clarify anything.
Thanks.




13 years ago
Greetings,

I am new to Java SE. In my previous CompSci experience I used Python. I have writing a program currently that requires my to calculate a GPA given the user's input for Grades in 5 classes. On top of this, I must calculate and print if their GPA is sufficient enough to award them making the President's List, Dean's List, or Academic Probation.

I am not allowed to use a loop to ask the User to input their class/grade 5 times, so I am unsure how to ask the user for their inputs without a loop. Also, I must include the line of code: "private static double gpaPts(String grade) {" and am unsure where to include this, much-less what its function is.

I am having issues in lines 34-59 with "Cannot find symbol, identifier expected, and Illegal start of type." I know this is alot wrong, but any help at all would help me on my way to writing this program fully. If any more details are required, please do ask. I am new to programming and don't always know how much is needed to fix something.

Thanks!

13 years ago