Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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) 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.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started