English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

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 Computers & Internet Programming & Design

1 answers

it is a small application, i dont consider it an application
i think it is just a long example on object oriented use..

2007-03-11 22:06:16 · answer #1 · answered by abd 5 · 0 0

fedest.com, questions and answers