Question
1. using c#. You will be creating an application to help our sales associates sell our main products, cogs and gears. Cogs have a whole
1. using c#. You will be creating an application to help our sales associates sell our main products, cogs and gears. Cogs have a whole sale price of $79.99 and gears have a whole sale price of $250.00. When our sales associates are selling to our customers on the floor, we have a standard 15% markup on our wholesale price for our sales price. However, if the customer purchases more than 10 of either item or a combined quantity of 16 items we only markup the items by 12.5%. On top of this, the sales tax for all sales is 8.9%.
- Create a console application that will prompt the sales associate for the number of cogs, the number of gears as well as their Customer ID for a sales order. Once the user has input all of the data needed, create a new instance of the Receipt (or a new Receipt object), call the PrintReceipt method on the object and then store it in some sort of collection. Then you should ask if there is another order that needs to be placed and repeat the process of order entry.
- After all orders are entered, give the user options to either print all receipts based off of a CustomerID, print all receipts for the day, or print the receipt for the sale that had the highest total. Keep prompting the user to see if they would like to perform another function until they indicate that they do not.
| Receipt |
+ + + + - - - | CustomerID : int CogQuantity : int GearQuantity : int SaleDate : DateTime SalesTaxPercent : double CogPrice : double GearPrice : double |
+ + + + - - | Receipt ( ) Receipt ( id : int, cog : int, gear : int ) CalculateTotal ( ) : double PrintReceipt ( ) : void CalculateTaxAmount ( ) : double CalculateNetAmount ( ) : double |
-
Constructors - Set all of the instance variables to their appropriate default values. For the SaleDate, set it to the current date and time.
-
CalculateTotal - The CalculateTotal method will tabulate the final total for the sale. To do this, you will need to call the CalculateNetAmount method and the CalculateTaxAmount method to get the net amount and the tax amount. You will then add the tax amount from the net amount and return that value.
-
PrintReceipt - The PrintReceipt method will write to the console all the details about the sale in an easy to read format. Not all on just one line, must include what the value represents (e.g. not just 5 but # of Cogs : 5). Format all values appropriately.
-
CalculateTaxAmount - The CalculateTaxAmount method will tabulate the total tax for the sale. To do this, you will need to call the CalculateNetAmount and then multiple by your class (instance) variable, SalesTaxPercent. You will then return the total tax for the sale (Note: this should be a positive value).
-
CalculateNetAmount - The CalculateNetAmount method will tabulate the net price of the sale. You will need to figure out what markup percent we need to add to our base unit prices for the Cog and Gears based upon the number purchased. Once you do this, the formula for to calculate the netAmount is:
netAmount = CogQuantity * Cog Price with markup + GearQuantity * Gear Price with markup You will then return the net amount for the sale from the method.
2. Directories and Files
You will be creating an application that will help you get familiar with using internet resources and solving what seems to be a complex problem. You will create a console application and then prompt the user to enter a directory path (e.g. C:/temp). You will need to make sure that it exists, if it does exist then we want to output all of the files in the directory (including extension) but not the full path (e.g. If there is a file named exam1.docx in c:\ temp, you would display exam1.docx and not c:\temp\exam1.docx)
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