Question: Hello, Here is the code to this problem. The code wont open in netbeans so can you make sure it runs: Exercise 11-3 Code an

Hello, Here is the code to this problem. The code wont open in netbeans so can you make sure it runs:



Exercise 11-3 Code an equals method In this exercise, you'll add and equals method to the Product and Lineltem classes that you can use to compare the instance variables of two objects. 1. Open the project named chll ex5 Pr 2. Run the project. Since the equals method isn't overridden in the Product or Lineltem oductLister that's in the extra_ex starts directory class, the output from this application should indicate that the comparisons are based on object references and not the data the objects contain like this: The Product class is comparing references The LineItem class is comparing references 3. Open the Product class, and add an equals method as shown in this chapter. Then, run the project again. This time, the output should indicate that the products are being compared based on their data like this: The Product clasa is comparing data The LineItem class is comparing references. 4. Repeat step 3 for the Lineltem class. This time, the comparisons for both the products and line items should be based on their data like this: The Product class is comparing data. The ineItem olass is comparing data
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
