Question 2 (15 marks) Describe and demonstrate how you would follow test-driven development to develop a class that has
Posted: Fri Jun 10, 2022 11:58 am
Question 2 (15 marks) Describe and demonstrate how you would follow test-driven development to develop a class that has the following functionalities: (a) convert a given amount of money in AUD into SGD; (b) given two integer numbers x and y ranging from -10 to 10, calculate their sum of squares (i.e. x² + y²); and (c) given a distance and the time taken a car to cover that distance, calculate its average speed. For each functionality, sketch 5 different unit test cases. Justify your choices of test cases. Your answer must be specific to this case study. Generic answers copied from the lecture slides or other sources will be given 0 mark.