Answer to Question #272093 in Java | JSP | JSF for drunkenreaper

Question #272093

Initialize two (2) variables to hold the employee name and the gross pay (amount before deductions). See sample output below.


Employee Name: Jess Diaz

Gross Pay: 25000.0

_________________________

Deductions Amount

Witholding Tax 3750.0

SSS Contributions: 907.5

Medicare: 312.5

Pagibig Contribution: 100.0

__________________________

Net Pay: 19930.0




1
Expert's answer
2021-11-27T02:33:36-0500
public class Main {
 static class Employee {
  String name;
  double grossPay;
 }
 public static void main() {
  Employee emp = new Employee();
  emp.name = "Jess Diaz";
  emo.name = 25000.0;
  System.out.println("_________________________");
  System.out.println("Deductions Amount");
  System.out.println("Witholding Tax 3750.0");
  System.out.println("SSS Contributions: 907.5");
  System.out.println("Medicare: 312.5");
  System.out.println("Pagibig Contribution: 100.0");
  System.out.println("_________________________");
  System.out.println("Net Pay: 19930.0");
 }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS