0
Answer

WTF does this teacher want me 2 do can someone explain it to me pls thx

Jenni Witzel

Jenni Witzel

16y
2.7k
1

/*   Description: As in lab 6, this program prompts for */

/*                and accepts information about an      */

/*                hourly employee and calculates wages  */

/*                and taxes using a class named         */

/*                Employee. This lab will also prompt   */

/*                for the employee's name, calculate    */

/*                overtime pay and loop to allow        */

/*                multiple employees.                   */

/*                                                      */

/********************************************************/

using System;

using SC = System.Console;

public class FLastLab07

{ //Main Method

    public static void Main()

    {

        string eName, hoursWorkedStr, rateOfPayStr;

        double hoursWorked, rateOfPay;

 

Oval: Priming Read        SC.WriteLine("Lab 7 – Your Name");

        SC.Write("\nPlease input Employee Name: ");

        employeeName = SC.ReadLine();

 

        while (employeeName != "Quit")

Oval: Loop logic – code from Lab 6
goes here plus you must call 
the PrintName method        {

           

           

           

 

                       

Oval: Get the next name
 


            SC.Write("\nPlease input Employee Name: ");

            employeeName = SC.ReadLine();

        }   // end of loop

 

        SC.WriteLine("\nEnd of Lab 7\n");

    }   // end of Main method

}   // end of Main class

 


class Employee

{

Oval: employeeName is new and so is the PrintName method    private string employeeName;    

 

    private double hoursWorked, rateOfPay, grossPay, stateTax,

                   federalTax, ficaTax, netPay;

 

    public Employee(string eName, double hrsWorked, double rate)

    {

        employeeName = eName;

        hoursWorked = hrsWorked;

        rateOfPay = rate;

    }

 

    public void PrintName()

Oval: \t is a tab    {

        SC.WriteLine("\nEmployee Name:\t{0}", employeeName);

    }

 

Oval: Modify this to calculate overtime pay when needed    public void CalculateGrossPay()

    {

        if (hoursWorked > 40)

            . . .

        else

            . . .

 

        SC.WriteLine("Gross pay is:\t{0,10}", grossPay.ToString("C"));

    }

       

    public void CalculateStateTax()

    {

               // same

    }

 

    public void CalculateFederalTax()

    {

               // same

    }

 

    public void CalculateFICATax()

    {

               // same

    }

 

    public void CalculateNetPay()

    {

               // same

    }

}   // end of Employee class