104k views
3 votes
Another method that might be desired is one that updates the Student's number of credit hours. This method will receive a number of credit hours and add these to the Student's current hours. Which of the following methods would accomplish this?a. public int updateHours( ){return hours;}b. public void updateHours( ){hours++;}c. public updateHours(int moreHours){hours += moreHours;}d. public void updateHours(int moreHours){hours += moreHours;}e. public int updateHours(int moreHours){return hours + moreHours;}

1 Answer

0 votes

Answer:

Option d is the method

Step-by-step explanation:

public void update Hours(int more Hours)

{

hours += more Hours;}e. public int update Hours(int more Hours){return hours + more Hours;

}

User Aatwo
by
4.7k points