lizz Palmer

Greenhorn
+ Follow
since Feb 10, 2012
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by lizz Palmer

I've been trying what you said and doing it out on paper all day and I'm not further ahead.
13 years ago
I really dont know what line I would be adding where lol. I looked at the values of fail and I think they say what I want so im lost.
13 years ago
It's my value of fail, correct? It ends up with a value of zero for every student. That's not right. I can't seem to see what's wrong with it but I'm assuming it's in there somewhere.
13 years ago
I tried moving the calculation for the fail class above the scanner but it just doesn't run that way.
13 years ago
Henry - Ok I think I get it a little better but when i put it in the while loop, it doesn't make a difference in the output.

while (aScanner.hasNext()){
Student student = new Student();
student.setLastName(aScanner.next());
student.setFirstName(aScanner.next());
student.setScore(aScanner.nextDouble());
student.setFail(fail);
total += student.getScore();
studentsArray[count] = student;
count++;

I'm assuming I would do it like that because I'm not calling it from the scanner document, it's just from the student class. ? Any suggestions what I am doing wrong?
13 years ago
Henry, this is my very very first java class and now my last because its so unbelievably had to comprehend. I don't know what you mean when you tell me I'm not using it. It's right there?!? it would be wonderful if you could give me a hint of some sort that I might understand. I have this project, one more and then my rediculous final. They told me I didn't need to know anything to take this course and obviously that's not true lol. The instructor doesn't answer my questions and it's an online class. I have just this forum to squeek by. It's destroying my perfect GPA hence why I am changing back to my MBA degree lol. Any hints you can give me would be very very appreciated. Lizz
13 years ago
Isn't this setting the fail?:

public double getFail() {
return fail;

}

public void setFail(double fail) {
this.fail = fail;
13 years ago
I know that it's the math part that isnt working. I added the "fail" to my string message just to see what it would display and it displays zeros for all of them. But i'm not sure what I have wrong!
13 years ago
ok I will try we have not been taught to do that. I still don't know what's missing in my code.
13 years ago
I'm sorry but I dont know what you mean and I don't know how to fix it.
13 years ago
I changed it like you said so I now have:

I had added the + fail on the string message and it messed up the output making the numbers 12.00.0 so I took that back out. The output still does not display the special message. here's my current output:

Welcome to the Student Scores Application.

Students Before Sorting

Gator, Ali: 85.0
Vator, Ella: 75.0
Beam, James: 95.0
Class, Lastin: 55.0
Class, Brenda: 12.0

Average: 64.0

Students After Sorting

Beam, James: 95.0
Class, Brenda: 12.0
Class, Lastin: 55.0
Gator, Ali: 85.0
Vator, Ella: 75.0
13 years ago
This is my output and I think that Brenda and Ali should get the message:

Welcome to the Student Scores Application.

Students Before Sorting

Gator, Ali: 85.0
Vator, Ella: 75.0
Beam, James: 95.0
Class, Lastin: 55.0
Class, Brenda: 12.0

Average: 64.0

Students After Sorting

Beam, James: 95.0
Class, Brenda: 12.0
Class, Lastin: 55.0
Gator, Ali: 85.0
Vator, Ella: 75.0
13 years ago
ok I did that and here is my code again. The only problem is that it isn't displaying the message. I must be missing something?
13 years ago
If I change it like this:

public String toString() {
String message = lastName + "," + " " + firstName + ":\t" + score; {
if(score <= fail){
System.out.println("Your score is not acceptable!");
return message;}
}

}}

it tells me that I have multiple markers on the to String line; that it overrides the java toSring language and that this method must return the result of a string. I want it to display that special message only when the person's score is 10 marks or more lower than the class average.
13 years ago
What would be a better way of saying what I am trying to. I need it to return the string info first then say your grade is below but if I put the return message after the if statement it doesnt work either.
13 years ago