using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration.Assemblies;
namespace CalculateWage
{
public class GetEmployeeName
{
public string LastName, FirstName;
}
public class GetEmployeeWorkHour
{
public int NumberofHours;
}
public class GetEmployeeWage
{
public int WagesforaWeek, HourlyRate;
}
public class GetEmployeededuction
{
public int Medical, UnionFee;
public int TotalDeduction, FederalTax;
}
public class GetNetpay
{
public int Netpay;
}
class Wage
{
static void Main(string[] args)
{
GetEmployeeName GEN = new GetEmployeeName();
GetEmployeeWorkHour GEH = new GetEmployeeWorkHour();
GetEmployeeWage GEW = new GetEmployeeWage();
GetEmployeededuction GDED = new GetEmployeededuction();
GetNetpay GNP = new GetNetpay();
Getinteger I = new Getinteger();
Getstring S= new Getstring();
GEN.FirstName = S.GetString("\nEnter ur First Name: ", "");
GEN.LastName = S.GetString("\nEnter ur Last Name: ", "");
GEH.NumberofHours = I.GetInteger("\nEnter no of hours worked: ", 0);
GEW.HourlyRate = I.GetInteger("\nEnter hourly rate:", 0);
GEW.WagesforaWeek = ((GEH.NumberofHours * GEW.HourlyRate) * 7);
Console.WriteLine("\nwages for a week:{0}", GEW.WagesforaWeek);
Console.ReadLine();
GDED.FederalTax = (GEW.WagesforaWeek * (18 / 100));
GDED.Medical = (GEW.WagesforaWeek * (5 / 100));
GDED.UnionFee = 8;
GDED.TotalDeduction = (GDED.FederalTax + GDED.Medical + GDED.UnionFee);
GNP.Netpay = (GEW.WagesforaWeek - GDED.TotalDeduction);
Console.WriteLine("\nName:{0}", GEN.LastName);
Console.WriteLine("\nThe gross pay of {0} is {1}", GEN.LastName, GEW.WagesforaWeek);
Console.WriteLine("\nThe total deduction is:{0}", GDED.TotalDeduction);
Console.WriteLine("\nThe net pay of {0} is: {1}", GEN.LastName, GNP.Netpay);
Console.ReadLine();
}
}
}
2007-03-11
21:51:46
·
1 answers
·
asked by
sp
1
in
Programming & Design