Question: Given the following class diagram, implement (write code for) the clone() method inside the SmartFridge class. The behavior of the clone() method must perform deep

Given the following class diagram, implement (write code for) the clone() method inside the SmartFridge class. The behavior of the clone() method must perform deep cloning > Cloneable on + clone(): SmartFridge > SmartFridge - totalFridges Made: int=0 - id: int fid) //unique ID - cpacity: int - noOfDoors: int -engine: Engine Hint: public class Smartfridge... 1/the code for the clone) method goes here
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
