Part 1
Write a program that calculates and prints the take – home pay for a commissioned sales employee. Allow the user 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 least one mutator and one accessor method and provide properties for the other instance variables. Create a second class to test your design.
Note: A sample executable file for part 1 is on the weblearn.fnu.ac.fj.The files for the classes in part 1 are in the weblearn.fnu.ac.fj
Part 2
Write a program that computes the amount of money the computer club receives from proceeds of their granola bar sales project. Allow the user to enter the number of case sold and the sale price per bar. Each case contains 12 bars; each case is purchased at $5.00 per case from a local vendor. The club is required to give the student government association 10% of their earnings. Display the proceeds formatted with currency. Write methods for your solution.
To get started with part 2
Step 1: Write the method to get the amount of bars sold.
static int BarsSold(double casesSold)
{
const int BARS_PER_CASE = 12;
}
Step 2 : Next write the method to get the gross sales.The bars sold which is retrieved from above step 1 is passed as parameter as bars sold.
static double GrossSales(double price, int barsSold)
{
}
Step 3 : Next write the method to calculate the net sales.The case sold and gross sales from step 2 above is passed as parmeter
static double NetSales(double casesSold, double grossSales)
{
const double WHOLESALE_COST_PER_CASE = 5.00;
}
Step 4 : Write the method to calculate government fee due. The net sales from step 3 above is passed as parameter.
static double GovtFeeDue(double netSales)
{
const double ASSOCIATION_FEE_RATE = 0.10;
(Assosication fee rate * net sales.
}
Step 5 : Write the method to calculate Net profit. The net sales from step 3 and government fee due from step 4 above is passed as parameter
static double NetProfit(double netSales, double govtFeeDue)
{
}
Step 6 : Display the results. Only the net profit need to be displayed so the profit refers to the net profit from step 5 above.
static void DisplayResults(double profit)
{
}
Step 7 : Write the methods in main to manipulate the data.