Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

please provide explanations! To compare two class objects use the == operator wr

ID: 3534565 • Letter: P

Question

please provide explanations!




To compare two class objects use the == operator write a method to do a byte-by-byte comparison use the .equals() method since objects have multiple fields, you cannot compare them accurate Image manipulation: usually uses a double for loop to go over all the pixels. . can use matrix multiplication to bring in values from surrounding pixels to affect a single pixel. uses the principles of additive light to make colors from red, green, and blue. all of the above. Which algorithm below is has the WORST complexity (i.e. takes the longest to run)? Fibonacci (recursive) merge sort binary search factorial (recursive)

Explanation / Answer

1)A

Explanation : == operator checks for the reference, not the value. Hence if you need to compare two Objects, you will need to compare refernce. Hence use == operator


2)D

Explanation : An Image can be thought of a 2D Matrix. Manipulation, hence is done by all 3 methods listed


3)A

Time Complexity for Fibonacci : O(2^n)

Time Complexity for Merge Sort : O(n*log(n))

Time Complexity for Binary Search : O(log(n))

Time Complexity for Factorial : O(n)