What is the complexity (i.e. the number of methods) of this approach, expressed in “big O” notation?
f(n) = n*(n-1) = n2-n. The dominating term is n2, therefore the number of methods is in O(n2). The size of the program grows quadratically. Exercise 5a: Using this new approach, what is the minimum number of methods we need to convert between three scales? Four scales? n scales? Except for the first scale, which serves as a connection between the scales, every scale needs two conversion functions: to the first scale and back. The first scale doesn’t need any conversions. Three scales: 4 methods Four scales: 6 methods n scales: 2*(n-1) methods Exercise 5b: What is the complexity (i.e. the number of methods) of this new approach, expressed in “big O” notation? The dominating term of 2*(n-1) = 2n – 2 is 2n. Therefore, the number of methods is in O(n) and we have achieved linear growth. Exercise 5c: Draw a UML diagram of the model using the new approach. The model should have the minimum number of methods to still perform arbitrary conversions between Celsius, Fahrenheit, and Kelvin. This