Question: 1. a). Consider this method then answer the questions that follow. (4 marks) public static float mystery (double a, double b) { float value =
1. a). Consider this method then answer the questions that follow. (4 marks) public static float mystery (double a, double b) { float value = 0; if (a b) value = 1.1; return value; } What is the identifier of the method? What are its parameters? What type of value is returned by the method? Rewrite the method using a nested if structure. b). What is the purpose of a constructor in a class? (2 marks) c). Give an example to create a new instance object of the class Fraction. (2 marks)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
