In this exercise, you'll implement the Cloneable interface for the Product and Lineltem classes. Open the project named ch09_ex3_CloneableTest in the ex_starts directory. Display the ProductCloneApp class and review its code. Note that this class contains an error because the clone method has protected access in the Object class and isn't available from the Product class. Implement the Cloneable interface for the Product class. When you do, the ProductCloneApp class should no longer display an error. Run the ProductCloneApp class to make sure it works correctly. To do that, you can right - click on this class and select the Run File command. Repeat steps 1 through 3 for the LineltemCloneApp and Lineltem classes.
Paper#66341 | Written in 18-Jul-2015Price : $32