X917: While Loops with Relational Operators 1

For this question, we will be working with a subclass of Jeroo called CountingJeroo that tracks the number of hops it has peformed. You can get the number of hops performed so far by calling the getHopCount() method.

Below is a while loop with using a Jeroo named imani.

Currently, this loop will cause the jeroo to hop 10 times.

Change the conditon so that the jeroo will only hop five times instead.

Your Answer:

Feedback

Your feedback will appear here when you check your answer.