Follow one robot's charge

Two separate Robot objects, rover and scout, store their own battery charge percentages. Initially, rover has 54% charge and scout has 73% charge. The methods subtract or add the stated number of percentage points to the target robot's charge.


The following calls occur in order, and all succeed:

  1. rover.consume(17)
  2. scout.recharge(11)
  3. rover.recharge(8)

What is rover's final charge as a percentage, to the nearest whole percent? Enter the number without a percent sign.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More The Object-Oriented Paradigm Questions: