Using Test Driven Development(TDD), build the classes below. Remember, you need to write the test case before writing the source code when using TDD. You should have getters and setters for every attribute in a class.
Note: Getters, Setters, and Constructors do not need to be tested
- getPerimeter()
- getArea()
- isSquare()
- getTotal()
- add(num)
- subtract(num)
- multiply(num)
- divide(num)
- clear()
- getCharge()
- charge(percentage) Increases the charge by the percent provide, max 100%
- fullyCharge() Increases the charge to 100%
- drive(miles) Note: The charge deplets 1% every 2 miles you drive