Answered step by step
Verified Expert Solution
Link Copied!

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
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.
image text in transcribed
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

C++ Database Development

Authors: Al Stevens

1st Edition

1558283579, 978-1558283572

More Books

Students also viewed these Databases questions

Question

3. Describe the strategic training and development process.

Answered: 1 week ago

Question

10. Microsoft Corporation

Answered: 1 week ago

Question

4. EMC Corporation

Answered: 1 week ago