Chapter 4 Group Activity

Credits to @crissyjarvis

Answer Exercise#1 (see below) from Chapter 4
Instructions:Calc currently implements one function: it adds two integers. test-driven design to add additional functionality to subtract integers, multiply two integers, and divide two integers. First create a failing test for one of the new functionalities, modify the class until the test passes, then perform any refactoring needed. Repeat until all of the required functionality has been added to your new version of Calc, and all tests pass.

Remember that in TDD, the tests determine the requirements. This means you must encode decisions such as whether the division method returns an integer or a floating point number in automated tests before modifying the software.

Comments

Popular posts from this blog

Chapters 6.1 & 6.2

Final Exam Questions

Course evaluation