Solved

Public Class Employee

Question 53

Essay

public class Employee
{
   private int empNum;
   private double empSalary;

   public void setEmpNum(int emp)
   {
      empNum = emp;
   } 
   public void setEmpSalary(double sal)
   {
      empSalary = sal;
   }
}
Given the class defined in the code above, write the Java statements that will create a new employee instance called employee15 and assign an empNum of 15 and empSalar y of 500.00 to that employee instance.

Correct Answer:

verifed

Verified

Employee employee15;
employee...

View Answer

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions