Discount

Ratings: 1 Star2 Stars3 Stars4 Stars5 Stars (5.00 out of 5) - Rate Now!
Loading...

Download Category:

Discount.zip - (184.92 KB)
[
Discount/Discount.png
Discount/Discount.sln
Discount/Discount.suo
Discount/Discount/
Discount/Discount/bin/
Discount/Discount/bin/Debug/
Discount/Discount/bin/Debug/Discount.exe
Discount/Discount/bin/Debug/Discount.pdb
Discount/Discount/bin/Debug/Discount.vshost.exe
Discount/Discount/bin/Debug/Discount.vshost.exe.manifest
Discount/Discount/Discount.csproj
Discount/Discount/obj/
Discount/Discount/obj/x86/
Discount/Discount/obj/x86/Debug/
Discount/Discount/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache
Discount/Discount/obj/x86/Debug/Discount.csproj.FileListAbsolute.txt
Discount/Discount/obj/x86/Debug/Discount.exe
Discount/Discount/obj/x86/Debug/Discount.pdb
Discount/Discount/obj/x86/Debug/TempPE/
Discount/Discount/Program.cs
Discount/Discount/Properties/
Discount/Discount/Properties/AssemblyInfo.cs
Discount/Question.txt
]

You have been contracted to create an application that can be used to determine the discount awarded for preferred customers. Because of the time limitation, you should focus your attention on the preferred customer class. Include data members of customer ID, customer name, and customer purchase. Define appropriate constructors and properties for the class.
Include a method that returns the discount percentage based on the following:
• When a preferred customer spends a minimum of $500, he or she gets a 5 percent discount
• When a preferred customer spends a minimum of $1,000, his discount is 6 percent
• When a preferred customer spends a minimum of $1,500, his discount is 7 percent discount
• When a preferred customer spends at least $2,000, he or she gets a 10 percent discount
Include an additional instance method that returns the actual reduced discounted price. Override the ToString( ) method to return the customer name, his purchase amount (formatted as currency), discount percentage (if any),and the reduced purchase price (formatted as currency).
Define the 2nd class to test your preferred customer class. You may instantiate your objects with literal data sent as arguments to the constructors. You do not have to input the data. USE YOUR OWN NAME AS THE CUSTOMER NAME FOR ONE OF THE OBJECTS THAT YOU INSTANTIATE. Before instantiating an object of the class, check to make sure the purchase amount entered is a positive integer. If the value entered for the purchase amount is negative, display an error message indicating the input is in-valid. Modularize your solution.
Sample output might look like:
Test1:
Customer: Barbara Doyle
Purchase Amt. $1,423.78
Discount Percent: 6%
Discounted Amt.: $1,338.36
Test2:
Customer: Sarah Wang
Purchase Amt. $401.28
Discount Percent: 0%
Discounted Amt.: $401.28

Get a fresh solution of this question. Ask it now to our experts.
doubt

Ask Your Question

We have verified professionals who are ready to answer your question.

time

Save Time and Money

We choose experts who can quickly answer your question and that suit your budget.

download

Get Your Answer

Your satisfaction is 100% guaranteed. You can keep on asking questions until you get the answer you need.