Question: please complete programs for the following questions. Please write programs for the following questions - Chapter 15: 15.2(Implement an enumerator) - Page 506 You will


please complete programs for the following questions. Please write programs for the following questions -
Chapter 15: 15.2(Implement an enumerator) - Page 506
You will have to complete Exercise 15-1 first before you can work on Exercise 15-2. Include comments in your code . While you save your program files , make sure you name them using your last name followed by a descriptive program name.
Chapter 15 How to work with interfaces and generics 505 Exercise 15-1 Implement the ICloneable interface In this exercise, you'll create an application that includes a Customer class that implements the ICloncable interface. This application creates a List that contains clones of a pre-defined Customer object and displays the cloned customers in a list box as shown below. To make this application easier to develop, we'll give you the starting form and classes. The design of the Clone Customer form Clone Customer John Mendes rendemeyeco.com Copies John Mendes pendensysco com John Mendes rendez@cocom John Mendez rendez@cocom Ext Development procedure 1. Open the application in the C:\C# 2015 Chapter 15 CloneCustomer directory. 2. Display the code for the form, and notice that the Load event handler creates a Customer object, stores it in a variable named customer, and displays the customer in the label at the top of the form. 3. Modify the Customer class so it implements the ICloneable interface. 4. Add an event handler for the Click event of the Clone button. This event handler should use the methods in the Validator class to check the value in the Copies text box to be sure it's present and also an integer. Then, it should create a Listo> object that contains the required number of clones of the Customer object. Finally, it should display the cloned customers in the list box. 5. Run the application and test it to make sure it works properly. 506 Section 3 Object-oriented programming Exercise 15-2 Implement an enumerator In this exercise, you'll modify your solution to exercise 15-1 so the clones are stored in a CustomerList object that implements an enumerator. 1. If it isn't already open, open the application in the C:\C# 2015\Chapter 151 CloneCustomer directory. 2. Implement the IEnumerable
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
