†Asian Ins†i†u†e Of Compu†er Studies†
†Asian Ins†i†u†e Of Compu†er Studies†

Payroll Code Part 2 Downlo10
Please Register To Log in...
†Asian Ins†i†u†e Of Compu†er Studies†
†Asian Ins†i†u†e Of Compu†er Studies†

Payroll Code Part 2 Downlo10
Please Register To Log in...
†Asian Ins†i†u†e Of Compu†er Studies†
Would you like to react to this message? Create an account in a few clicks or log in to continue.

†Asian Ins†i†u†e Of Compu†er Studies†


 
HomeGalleryLatest imagesSearchRegisterLog in
Log in
Username:
Password:
Log in automatically: 
:: I forgot my password
†AE1DA†MixPOD†

Latest topics
» JAVA CALCULATE
Payroll Code Part 2 I_icon_minitimeMon Sep 17, 2012 2:14 pm by †`Li†o`†

» Grid Layout
Payroll Code Part 2 I_icon_minitimeMon Aug 13, 2012 3:43 pm by †`Li†o`†

» Flow Layout
Payroll Code Part 2 I_icon_minitimeMon Aug 13, 2012 3:41 pm by †`Li†o`†

» Border Layout
Payroll Code Part 2 I_icon_minitimeMon Aug 13, 2012 3:38 pm by †`Li†o`†

» InputStreamAndOutputStream
Payroll Code Part 2 I_icon_minitimeMon Aug 13, 2012 3:31 pm by †`Li†o`†

» Triangles Task 1 & 2
Payroll Code Part 2 I_icon_minitimeMon Jul 23, 2012 3:32 pm by †`Li†o`†

» Java Central and Sub Class
Payroll Code Part 2 I_icon_minitimeMon Jul 09, 2012 3:40 pm by †`Li†o`†

» Payroll Code Part 2
Payroll Code Part 2 I_icon_minitimeMon Jul 02, 2012 4:03 pm by †`Li†o`†

» pakyu to .i.
Payroll Code Part 2 I_icon_minitimeMon Jun 25, 2012 4:20 pm by `jhajha lanqs`

» Payroll Code
Payroll Code Part 2 I_icon_minitimeMon Jun 25, 2012 3:58 pm by †`Li†o`†

» this is it ! xDD !!
Payroll Code Part 2 I_icon_minitimeTue Feb 28, 2012 8:11 am by `jhajha lanqs`

» Summary/ Plot Of DATE MOVIE!!
Payroll Code Part 2 I_icon_minitimeTue Feb 28, 2012 8:06 am by †`Li†o`†

» about valentines day !
Payroll Code Part 2 I_icon_minitimeFri Feb 17, 2012 7:24 am by `jhajha lanqs`

» cos3 Number Guessing Game !
Payroll Code Part 2 I_icon_minitimeMon Feb 13, 2012 7:49 am by @†`JeRoLD`†

» eto yown e....
Payroll Code Part 2 I_icon_minitimeMon Feb 13, 2012 6:22 am by †`Li†o`†

Top posters
†`Li†o`† (80)
Payroll Code Part 2 I_vote_lcapPayroll Code Part 2 I_voting_barPayroll Code Part 2 I_vote_rcap 
`jhajha lanqs` (42)
Payroll Code Part 2 I_vote_lcapPayroll Code Part 2 I_voting_barPayroll Code Part 2 I_vote_rcap 
Jasper ! (12)
Payroll Code Part 2 I_vote_lcapPayroll Code Part 2 I_voting_barPayroll Code Part 2 I_vote_rcap 
@†`JeRoLD`† (9)
Payroll Code Part 2 I_vote_lcapPayroll Code Part 2 I_voting_barPayroll Code Part 2 I_vote_rcap 
hEEcHuL05 (9)
Payroll Code Part 2 I_vote_lcapPayroll Code Part 2 I_voting_barPayroll Code Part 2 I_vote_rcap 
†.frAnCis.† (6)
Payroll Code Part 2 I_vote_lcapPayroll Code Part 2 I_voting_barPayroll Code Part 2 I_vote_rcap 
jenny (5)
Payroll Code Part 2 I_vote_lcapPayroll Code Part 2 I_voting_barPayroll Code Part 2 I_vote_rcap 
†Yaphe†S† (3)
Payroll Code Part 2 I_vote_lcapPayroll Code Part 2 I_voting_barPayroll Code Part 2 I_vote_rcap 
Lhuisi†0 (1)
Payroll Code Part 2 I_vote_lcapPayroll Code Part 2 I_voting_barPayroll Code Part 2 I_vote_rcap 
julie cko (1)
Payroll Code Part 2 I_vote_lcapPayroll Code Part 2 I_voting_barPayroll Code Part 2 I_vote_rcap 
May 2024
MonTueWedThuFriSatSun
  12345
6789101112
13141516171819
20212223242526
2728293031  
CalendarCalendar

 

 Payroll Code Part 2

Go down 
AuthorMessage
†`Li†o`†
Admin
†`Li†o`†


Male Scorpio Posts : 80
Points : 168
Reputation : 9
Birthday : 1995-11-16
Join date : 2011-08-31
Age : 28
Location : Mayapa Calamba Laguna
Job/hobbies : Playing Computer Games.

Payroll Code Part 2 Empty
PostSubject: Payroll Code Part 2   Payroll Code Part 2 I_icon_minitimeMon Jul 02, 2012 4:03 pm

Quote :
import java.io.*;
class Payroll{
static File emprec = new File ("e:employee.txt");
static BufferedReader In = new BufferedReader (new InputStreamReader(System.in));
private static String[] tmptime;
private static double holidayrate;
private static double[][] OTtimeInOut;
private static double otrate;

public static void main (String[]jbi) throws Exception{
System.out.print("EMPLOYEE CODE: ");
String empcode = In.readLine();
BufferedReader read = new BufferedReader(new FileReader(emprec));
String content;
double salaryrate=0;
while((content=read.readLine())!=null)
{
String[]info = content.split(".");
String empName=info[1];
String empNum = info[0];
String empLevel = info[2];if (empNum.equals(empcode))
{
System.out.println("*******************");
System.out.print("EMPLOYEE NAME: " + empName);
System.out.print("\nEMPLOYEE CODE: " + empNum);
System.out.print("\nSALARY LEVEL: Level" + empLevel);
if(empLevel.equals("1")){System.out.println("\nSALARY RATE: Php 380.00/day"); salaryrate = 380; }
else if (empLevel.equals("2")){System.out.println("\nSALARY RATE: Php 450.00/day"); salaryrate = 450; }
else if (empLevel.equals("3")){System.out.println("\nSALARY RATE: Php 550.00/day"); salaryrate = 550; }
System.out.println("*******************");
}
}

String[]days = {"MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY"};
Double timeInOut[][] = new Double[2][5];
double reghours = 0;
double regincome = 0;
double hourlyrate = 0,orate = 0, holiday=0;
double othours = 0;
double otIncome = 0;
String ans;
for(int x=0;x<=4;x++)
{
System.out.print("Enter the Time-In for"+days[x]+":");
String timeIn = In.readLine();
String[] Imptime = timeIn.split(".");
String hour = tmptime[0];
String min = tmptime[1];
timeInOut[0][x] = Double.parseDouble(hour)+Double.parseDouble(min)/60;


System.out.print("Enter the Time-Out for"+days[x]+":");
String timeOut = In.readLine();
String[] ImptimeO = timeOut.split(".");
String hourO = tmptime [0];
String minO = tmptime [1];
timeInOut[1][x] = Double.parseDouble(hourO)+Double.parseDouble(minO)/60;
///////////////////////////
reghours += timeInOut[1][x]-timeInOut[0][x]-1;
///////////////////////////
//HOLIDAY
System.out.println("Is"+days[x]+"a holiday?");
ans=In.readLine();
if(ans.equals("yes"))
{
holidayrate=(salaryrate/8)*1.1;
}
else
{
hourlyrate=salaryrate/8;
}
regincome = reghours * (hourlyrate + holidayrate);

//
///////////////OVERTIME
System.out.print("Enter the OverTime-In for"+days[x]+":");
String OTtimeIn=In.readLine();
String[]OTtmptime=OTtimeIn.split(".");
String OThour = OTtmptime[0];
String OTmin = OTtmptime[1];
OTtimeInOut[0][x] = Double.parseDouble(OThour)+ Double.parseDouble(OTmin)/60;
System.out.print("Enter the OverTime-Out for"+days[x]+":");
String OTtimeOut=In.readLine();
String[]OTtmptimeO=OTtimeOut.split(".");
String OThourO = OTtmptimeO[0];
String OTminO = OTtmptimeO[1];
OTtimeInOut[1][x] = Double.parseDouble(OThour)+ Double.parseDouble(OTmin)/60;

othours += OTtimeInOut[1][x]-OTtimeInOut[0][x];
otrate = (salaryrate/8)*1.1;
otIncome = othours*otrate;

}


System.out.print("\nENTER THE COVERAGE DATE OF THIS PAYROLL: ");
String covdate = In.readLine();
System.out.println("*******************************");
System.out.println("DATE COVERED: "+covdate);
System.out.println("TOTAL NUMBER of WORK HOURS: "+reghours);
System.out.println("OVERTIME HOURS: "+othours);
System.out.println("REGULAR INCOME: "+regincome);
System.out.println("OVERTIME INCOME: "+otIncome);
System.out.println("*************************");



}

}


Quote :
Notepad:

101,lito,2
102,dex,1

yan na po Payroll Code Part 2 702243357
Back to top Go down
https://ae3ea.forumtl.com
 
Payroll Code Part 2
Back to top 
Page 1 of 1
 Similar topics
-
» Payroll Code
» Facebook Chat Source Code in C++

Permissions in this forum:You cannot reply to topics in this forum
†Asian Ins†i†u†e Of Compu†er Studies† :: †AE1DA†Computer†Programming†Section† :: †JAVA†-
Jump to: