John Rhenz H. Japsay Bit-Computer Technology 4A-G1
John Rhenz H. Japsay Bit-Computer Technology 4A-G1
JAPSAY
BIT- COMPUTER TECHNOLOGY
4A-G1
package javaproject1;
import java.text.*;
}
}
package javaproject1;
import java.io.*;
public class JavaProject1 {
==================================================
==============================
package javaproject1;
import java.io.*;
import java.text.*;
public class Calculate {
public int regHours; public int overHours;
public float hourPayRate;
public float grossPay; int deductions; String status; double incomeTax, deducted;
int ctr = 0;
regHours *= hourPayRate;
hourPayRate *= 1.5;
overHours *= hourPayRate;
grossPay = regHours + overHours;
: ");
regHours = Integer.parseInt(input.readLine());
System.out.print("Enter Overtime Hours Worked
: ");
overHours = Integer.parseInt(input.readLine());
System.out.print("Enter Hourly Pay Rate
hourPayRate = Float.parseFloat(input.readLine());
}
void ComputedPay(){
Taxes taxes = new Taxes();
: ");
int x = 0;
x++;
while(x != 0){
: ");
status = input.readLine();
if(status.equalsIgnoreCase("m")){
x = 0;
}
else if(status.equalsIgnoreCase("s")){
x = 0;
}
else{
System.out.println("Enter 'M' or 'S' only!");
}
}
}
void InputEmployeeNumber()throws IOException{
BufferedReader input = new BufferedReader(new
InputStreamReader(System.in));
int x = 0;
x++;
while(x != 0){
System.out.print("Enter Employee Number
empNum = input.readLine();
if (empNum.length() == 11){
x = 0;
empnum[ctr] = empNum;
}
}
}
void InputDeductions()throws IOException{
: ");
int x = 0;
x++;
while(x != 0){
System.out.print("Enter number of Exemptions taken (0-4) : ");
deductions =Integer.parseInt(input.readLine());
switch (deductions) {
case 0:
x = 0;
break;
case 1:
deducted = 13.50 * 1;
x = 0;
break;
case 2:
deducted = 13.50 * 2;
x = 0;
break;
case 3:
deducted = 13.50 * 3;
x = 0;
break;
case 4:
deducted = 13.50 * 4;
x = 0;
break;
default:
}
}
void Arrays(){
int x; double grosspayTotal = 0;double incometaxTotal = 0; double netpayTotal
= 0;
NumberFormat formatter = new DecimalFormat("P"+" ##000.00");
System.out.println("Employee
Gross
System.out.println("Number
System.out.println("---------
Pay
-------
Deductions
Net");
Pay");
--------
--------");
-------
--------
--------");
System.out.println("Totals"+"\t\t"+formatter.format(grosspayTotal)+"
"+formatter.format(incometaxTotal)+"\t
"+formatter.format(netpayTotal));
}
==================================================
================================