Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.07 KB | None | 0 0
  1. import java.util.Scanner;
  2. public class Zaulda_Practical
  3. {
  4. public static void main(String[] args)
  5. {
  6.  
  7. int undertime, days;
  8. int nums;
  9. String n;
  10. String nem = "";
  11.  
  12.  
  13.  
  14. Scanner emplo = new Scanner(System.in);
  15.  
  16. System.out.println("Type of Employees: ");
  17. System.out.println("[1] Teaching Permanent (Php1,000.00)");
  18. System.out.println("[2] Teaching JO (Php600.00)");
  19. System.out.println("[3] Non-Teaching Permanent (Php700.00)");
  20. System.out.println("[4] Non-Teaching JO (360.00)\n");
  21.  
  22. System.out.println("Select type of Employee(Enter a number only): ");
  23. nums = emplo.nextInt();
  24. if(nums == 1)
  25. {
  26. nem = "Teaching Permanent";
  27. System.out.print("'Teaching Permanent'\n");
  28. System.out.print(" PROCEED BELOW\n");
  29. nums = 1000;
  30.  
  31. }else if(nums == 2)
  32. {
  33. nem = "Teachers JO";
  34. System.out.print("'Teachers JO'\n");
  35. System.out.print("PROCEED BELOW\n");
  36. nums = 600;
  37.  
  38. }else if(nums == 3)
  39. {
  40. nem = "Non-Teaching Permanent";
  41. System.out.print("'Non-Teaching Permanent'\n");
  42. System.out.print(" PROCEED BELOW\n");
  43. nums = 700;
  44.  
  45. }else if(nums == 4)
  46. {
  47. nem = "Non-Teaching JO";
  48. System.out.print("'Non-Teaching JO'\n");
  49. System.out.print(" PROCEED BELOW\n");
  50. nums = 360;
  51. }
  52.  
  53.  
  54.  
  55. System.out.print("\n");
  56. System.out.print("Enter Employee's Name: \n ");
  57. n = emplo.next();
  58. n = n + " " + emplo.next();
  59. System.out.print("No. of Days Served: ");
  60. days = emplo.nextInt();
  61. System.out.print("Under Time: ");
  62. undertime = emplo.nextInt();
  63.  
  64. double earn,tax,deduct,net;
  65. earn = (nums *days);
  66. tax = (earn*.03);
  67. deduct = (undertime*1.25);
  68. net = (earn - tax - deduct);
  69.  
  70. System.out.print("\n");
  71. System.out.print("Employee's Name: " + n + "\n");
  72. System.out.print("\nType of Employee: " + nem + "\n");
  73. System.out.print("\nRate per Day: " +"PhP "+nums + "\n");
  74. System.out.print("\nEarned for Period: " + "PhP "+ earn + "\n");
  75. System.out.print("\nTax Deduction: " +"PhP "+ tax + "\n");
  76. System.out.print("\nAmount Deducted: " +"PhP "+ deduct + "\n");
  77. System.out.print("\nNet Amount Recieved: " +"PhP "+ net + "\n");
  78.  
  79.  
  80. }
  81. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement