Ask Question

Assume that another method has been defined that will compute and return the student's class rank (Freshman, Sophomore, etc). It is defined as: public String getClassRank () Given that s1 is a student, which of the following would properly be used to get s1's class rank? A) S1 = getClassRank (); B) S1. toString (); C) S1. getHours (); D) S1. getClassRank (); E) GetClassRank (s1);

+3
Answers (1)
  1. 18 December, 01:39
    0
    Option (D) i. e., s1. getClassRank (); is the correct option to the following question.

    Explanation:

    Here, in the following option, the object "S1" is the object of the class "rank" and "getClassRank () " is the function of that class "rank". so, in the following code the function "getClassRank () " is called through the class object which computes and returns the class rank of the students.

    So, that's why the following option is the correct way to call the function.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Assume that another method has been defined that will compute and return the student's class rank (Freshman, Sophomore, etc). It is defined ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers