Examlex

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.


Definitions:

Silica

A mineral compound made of silicon and oxygen (SiO2), commonly found in quartz and used in various technologies and construction materials.

Scouring Pads

Abrasive materials used for cleaning to remove tough dirt, stains, and material from surfaces without damaging them.

Mature Pollen Grain

The haploid male gametophyte phase of plants that contains the cells that will fertilize female ovules, enabling sexual reproduction.

Male Gametophyte

The haploid stage in the life cycle of plants that produces the male gametes or sperm cells.

Related Questions