#BlueJ class context comment0.target=class\ Person comment0.text=Person.java\ 1.0\n\nExample\ for\ OOP\n\n\n comment1.params=args comment1.target=void\ main(String[]) comment2.params=car comment2.target=void\ setCar(Car) comment2.text=pre\:\ car.owner\ \=\ this\n\n comment3.params= comment3.target=Car\ getCar() comment4.params=name comment4.target=Person(String) comment5.target=car comment6.target=name comment7.params= comment7.target=String\ toString() comment8.params= comment8.target=Object\ clone() comment8.text=Exercise\ 4\nFirst\ remember\ to\ implement\ the\ interface\ Cloneable\nA\ simple\ solution\ is\ to\ make\ the\ cloned\ person\ NOT\ own\ a\ car.\nThis\ is\ what\ is\ done\ below.\nAn\ other\ solution\ is\ to\ say\ one\ cannot\ clone\ persons\ who\ owns\ a\ car.\nAlso,\ we\ provide\ the\ clone\ with\ a\ clone\ of\ the\ car.\n\n numComments=9