Code required in C sharp Part 1: Design a class named Person with properties for holding a person’s name, address, and telephone number. Next, design a class named Customer, which is derived from the Person class. The Customer class should have a property for a customer number and a Boolean property indicating whether the customer wishes to be on a mailing list. Demonstrate an object of the Customer class in a simple application.   Part 2 A retail store has a preferred customer plan where customers can earn discounts on all their purchases. The amount of a customer’s discount is determined by the amount of the customer’s cumulative purchases in the store as follows: • When a preferred customer spends $500, he or she gets a 5 percent discount on all future purchases. • When a preferred customer spends $1,000, he or she gets a 6 percent discount on all future purchases. • When a preferred customer spends $1,500, he or she gets a 7 percent discount on all future purchases. • When a preferred customer spends $2,000 or more, he or she gets a 10 percent discount on all future purchases. Design a class named PreferredCustomer, which is derived from the Customer class you created in Programming Problem 4. The PreferredCustomer class should have properties for the amount of the customer’s purchases and the customer’s discount level. Demonstrate the class in a simple application.

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter12: Adding Functionality To Your Classes
Section12.2: Providing Class Conversion Capabilities
Problem 6E
icon
Related questions
Question

Code required in C sharp

Part 1:

Design a class named Person with properties for holding a person’s name, address,
and telephone number. Next, design a class named Customer, which is derived from
the Person class. The Customer class should have a property for a customer number
and a Boolean property indicating whether the customer wishes to be on a mailing
list. Demonstrate an object of the Customer class in a simple application.

 

Part 2

A retail store has a preferred customer plan where customers can earn discounts on
all their purchases. The amount of a customer’s discount is determined by the
amount of the customer’s cumulative purchases in the store as follows:
• When a preferred customer spends $500, he or she gets a 5 percent discount on
all future purchases.
• When a preferred customer spends $1,000, he or she gets a 6 percent discount
on all future purchases.
• When a preferred customer spends $1,500, he or she gets a 7 percent discount
on all future purchases.
• When a preferred customer spends $2,000 or more, he or she gets a 10 percent
discount on all future purchases.
Design a class named PreferredCustomer, which is derived from the Customer
class you created in Programming Problem 4. The PreferredCustomer class should
have properties for the amount of the customer’s purchases and the customer’s discount
level. Demonstrate the class in a simple application.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,