1. Use the pseudocode below to answer parts (a) and (b). Do not be concerned with the method’s purpose.
01 public double salary(double wage, double hours) {
02 double salary;
03 double overtime;
04 final double LIMIT = 40.0;
05 if(hours <= LIMIT) { 06 salary = hours * wage; 07 } else { 08 overtime = hours - LIMIT; 09 salary =(wage * LIMIT) + (wage * overtime * 1.5); 10 } 11 return salary; 12 } Part (a) - Perform an algorithm analysis by counting the execution steps and writing the resulting expression. Show your work by listing the counts for each line and state a very brief explanation about how you derived it. Finally, write the reduced expression resulting from your analysis (not the Big-Oh notation for it). For example (and this is not correct for the above): 01 1 assigned a value 02 4 three math operations and assignment And so on... Expression: 4n^2 + 6n + 3 Line 01: Line 02: Line 03: Line 04: Line 05: Line 06: Line 07: Line 08: Line 09: Line 10: Line 11: Line 12: Expression: Part (b) - What is the Big-O notation for the algorithm? Briefly explain why given your results from (a).