Professional Documents
Culture Documents
Payroll
Payroll
BSECE-1
COMPUTER PROGRAMMING
FLOWCHART
Start
Input
String name
int rate
int houseworked
double netpay
double overtimepay
double grosspay
double taxdeduction
System.out.println ("Invalid")
End
JAVA CODE
import java.util.Scanner;
String name;
int rate;
int hoursworked;
double netpay;
double overtimepay;
double grosspay;
double taxdeduction;
double basicpay = 0;
name = input.nextLine();
rate = input.nextInt();
hoursworked = input.nextInt();
if (hoursworked >=0 && hoursworked <=40 ){
overtimepay = 0;
grosspay = basicpay;
taxdeduction = 0;
netpay = basicpay;
if (grosspay <=5000){
taxdeduction = 0;}
else {
taxdeduction = 0;}
netpay = grosspay - taxdeduction;
else
System.out.println ("Invalid");
}
SCREENSHOTS