Consider the Calc.java program below. Calc currently implements one function add which adds two integers. Use the
Question:
Consider the Calc.java program below. Calc currently implements one function add which adds two integers. Use the Test-Driven Development (TDD) methodology to add additional functionality to subtract two integers, multiple two integers, divide two integers, and set an integer exponent to another integer. The process is to create a failing JUnit test, modify the class to make that test pass, then perform any refactoring needed. Repeat this process until each piece of functionality is added and all tests pass. Remember, TDD defines the requirements as the test themselves. You may write the actual code in an IDE and take screenshots or write the code manually in the document you submit. public class Calc { public static int add(int a, int b) { return a + b; } } a. 2. Building off of Problem 1, use TDD to further extend the Calc class. That is, the customer wants to add one additional feature as detailed below. Create a user story to allow users to save the calculated value in memory and used in consecutive calculations. b. Write the JUnit test or tests needed to satisfy this user story. Explain how the Calc class must be refactored to satisfy your JUnit test or tests. C.