Share
Programming Project 9.22.5: •. Write a class Battery that models a rechargeable battery. A battery has a constructor Battery(double capacity) where capacity is a value measured in milliampere hours. A typical AA battery has a capacity of 2000 to 3000 mAh. The member function void drain(double amount) drains the capacity of the battery by the given amount. The member function void charge() charges the battery to its original capacity. The member function double get_remaining_capacity() gets the remaining capacity of the battery.
ReportQuestion
Please briefly explain why you feel this question should be reported.
Programming Project 9.22.5: •. Write a class Battery that models a rechargeable battery. A battery has a constructor Battery(double capacity) where capacity is a value measured in milliampere hours. A typical AA battery has a capacity of 2000 to 3000 mAh. The member function void drain(double amount) drains the capacity of the battery by the given amount. The member function void charge() charges the battery to its original capacity. The member function double get_remaining_capacity() gets the remaining capacity of the battery.
Answer ( 1 )
Please briefly explain why you feel this answer should be reported.