This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Calling a method into a tester  RSS feed

 
Zachary T. Anderson
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is a problems I am having:

I have three classes: Student, Grade, and StudentTester. This code is in Student. It is calling the scores array from Student. I think this works.
What I would like to do is call the getLowestGrade method into my StudentTester, but keep getting the error:
 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you call Student.getLowestGrade(), which Student object is that supposed to operate on? Presumably there could be many students, right?

 
Zachary T. Anderson
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are my hero today..... Thank you so much. I can see what I have been doing wrong....
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!