Write a c# program that calculates and prints the take-home pay for a commission
ID: 3646370 • Letter: W
Question
Write a c# program that calculates and prints the take-home pay for a commissioned sales employee. Allow the user to enter values for the name of the employee and the sales amount for the week. Employees receive 7% of the total sales. Federal tax rate is 18%. Retirement contribution is 10% social security tax rate is 6%. Use appropriate constants, design an object-oriented solution, and write constructors. Include at lest one mutator and one accessor method; provide properties for the other instance variables. Create a second class to test your design.Explanation / Answer
static int BarsSold(double casesSold) { const int BARS_PER_CASE = 12; //return Bars Sold which is cases sold * bars per case static double GrossSales(double price, int barsSold) { //return the gross sales which is price * bars sold } static double NetSales(double casesSold, double grossSales) { const double WHOLESALE_COST_PER_CASE = 5.00; //return net sales = gross sale - ( case sold * wholesale cost per case) } static double GovtFeeDue(double netSales) { const double ASSOCIATION_FEE_RATE = 0.10; //calculate the Govt Fee due and return it. (Assosication fee rate * net sales. } static double NetProfit(double netSales, double govtFeeDue) { //return net profit which is net sales - govt fee due. } static void DisplayResults(double profit) { //display Net Profit. }
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.