//Programmer: Thomas Ruchty
//Date: Start: 10/05/2023 End: 10/11/2023
//Asignment: Express Cafe
//Description: a program ment to calculate a workers net pay
using System;
public class Program
{
public static void Main()
Console.WriteLine("Express Café Employee Pay Calculator");
Console.WriteLine("Please enter your Employee Number: "); //enters employee number. This doesn't do anything else in the program, it's just a nice little addition
String empNum = Console.ReadLine();
Console.WriteLine("Please enter your Hours Worked: "); //enters hours worked
double HWorked = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Please enter your Hourly Rate: "); //enters your hourly rate
double HRate = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Are taxes being deducted from your paycheque? Please type 'YES' or 'NO'."); //determines whether or not takes are applied to the users paycheque
String taxes = Console.ReadLine();
Console.WriteLine("Please inform us if you are a student. Type 'YES' or 'NO'."); //tells the program if the user is a student or not
String student = Console.ReadLine();
double GPay = 0; //declares GPay as a variable
double NPay = 0; //declares NPay as a variable
if (HWorked <= 40)
GPay = HWorked*HRate;
else if (HWorked > 40)
GPay = (HRate*40)+((HWorked/40)*(HRate*1.5));
if (taxes.Substring(0,1).ToUpper() == "Y")
{NPay = (GPay)-(GPay*0.13)-(GPay*0.0595)-(GPay*0.0163);// the deductions of 5.95% qnd 1.63% represent the deductions for the Canadian Pension Plan and Employer's Insurance
Console.WriteLine("13% has been deducted from your paycheque");
Console.WriteLine("Your net pay is: " + "{0:C2}",NPay);}
else if (taxes.Substring(0,1).ToUpper() == "N"){
Console.WriteLine("No taxes are applied to your paycheque, Hooray!");
NPay = (GPay)-(GPay*0.0595)-(GPay*0.0163); //no 13% deduction taken off
Console.WriteLine("Your net pay is: " + "{0:C2}",NPay);
}
if (student.Substring(0,1).ToUpper() == "Y"){ //specifies if the user is a student or not
{NPay = (GPay)-(GPay*0.0595)-(GPay*0.0163);
Console.WriteLine("So you're a student, huh? good luck with your studies!");}
}}