import java.util.Scanner;
class employee {
  float rate = 300.0f, work=10.0f; int hour;
  final float calOT() {
    return hour*rate/work;
  }
}
class daily_emp extends employee {
}
class monthly_emp extends employee {
  float calmOT(float bonus) {
    float pay = hour*rate/work;
    if (hour>100)
      pay += bonus;
    return pay;
  }
}
public class FinalMethod {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    employee x  = new employee();
    System.out.print("Enter total OT hour : ");
    x.hour= scan.nextInt();
    System.out.println("\"Employee\"\nTotal OT Pay = (" + x.rate +
            " * " + x.hour + ") = " + x.calOT() + " BAHT");
    daily_emp y  = new daily_emp();
    y.hour = x.hour;
    System.out.print("\"Daily Employee\"\nRate per Day = ");
    y.rate = scan.nextFloat();
    System.out.println("Total OT Pay = (" + y.rate + " * " + y.hour + ") = " + y.calOT()+ " BAHT");
    monthly_emp z   = new monthly_emp();
    z.hour = x.hour;
    System.out.print("\"Monthly Employee\"\nEnter Salary =  ");
    z.rate = scan.nextFloat();
    z.rate = z.rate/30;
    System.out.print("Enter Bonus = ");
    int b = scan.nextInt();
    System.out.println("Total OT Pay = (" + z.rate + " * " + z.hour + ") + "
            + b + " = " + z.calmOT(b) + " BAHT");        
  }
}