Question: C# Class hierarchy Implement polymorphism using an interface Complete exercise 14.1 I will include the starter code for this exercise C#Implement the following class hierarchy

C# Class hierarchy
Implement polymorphism using an interface
Complete exercise 14.1 I will include the starter code for this exercise
C#Implement the following class hierarchy a bender class that represents an into tea that sells goods for you, a customer class that represent objects that buys goods from you, and a shop class that represent objects that buys goods from you and sells good for you.
Polymorphism allow you to treat objects of different types as if they were the same type by referring them to a base class that is common to both objects. The benefits you polymorphism is that the users able to write generic code that designed to work with a base class.
 C# Class hierarchy Implement polymorphism using an interface Complete exercise 14.1
I will include the starter code for this exercise C#Implement the following

e 14-1 Create a Customer Maintenance In this exercise, you'll Cust classes works with two types of customers: retail customers and wholesale customers. Both customer types Customer class vos of customers. To mak the starting forms and classes. application that uses inheritance with the inheritance features presented in this chapter. This application are derived from a Customer base class, both extend the e this application easier to develop, we'll give you Il create a Customer Maintenance application that uses The design of the Customer Maintenance form The design of the Add Customer forms dd Wholesele Customer Add Retail Customer Last Nane Conpany Hone phone Save Open the project and create the derived classes I Open the application in the cic#2015Chapteriacustomer)Maintenance directory Display the Customer Class and modify the GetDisplay Text method so it's overridable. 2. Add a class named WholesaleCustomer that inherits the Customer class. This new class 3. should add a string property named Company. It should also provide accepts four parameters (first fault constructor and a constructor that name, last name, email, and company) to initialize the class properties. This constructor should call the base class constructor to initialize the properties ned by that class. Finally, this class should override the GetDisplayText method to add the company name in parentheses to the end of the display string, as in this example: Mendez, jmendez@msystem.com (Mendez Systems)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!