Part 1:
Option d) is correct one.
public void updateHours(int moreHours)
{
hours += moreHours;
}
Explanation:
The variable more hours will be given as argument to the function that will add the previous counted hours to the new ones. So the function updateHours will return total number of credit hours as required.
Part 2:
Option d) is the correct one.
c.flip( );
if(c.toString( ).equals(guess)) System.out.println("User is correct");
Explanation:
If the result of c.flip() gets equal to the guess the string "User is correct" will be printed on the screen to lag that the user is right otherwise the user will be wrong.
Part 3:
Option c) is the correct one.
the percentage of heads flipped out of 1000 flips
Explanation:
As we can see through the code that the total number of heads is divided by the number 1000 that is the total o all flips so it will give the percentage of the heads flipped out of 1000 lips.