Question: 2 questions (java code) 3. Create a class called Employee that includes three pieces of information as instance variables an employee id (int), name (type

2 questions (java code) 2 questions (java code) 3. Create a class called Employee that includes

3. Create a class called Employee that includes three pieces of information as instance variables an employee id (int), name (type String) and a monthly salary (double). a. Write a constructor to initialize the instance variable b. Write a check salary method which checks the monthly salary if the monthly salary is not positive, set it to 0.0. c. Write a test application named EmployeeTest that demonstrates class Employee's capabilities. d. Create three Employee objects and display each object's yearly salary and give each Employee a 10% raise and display each Employee's yearly salary again. 4. Create a class called Date that includes three pieces of information as instance variables a month (type int), a day (type int) and a year (type int). Initializes the three instance variables and assumes that the values provided are correct. Provide a set and a get method for each instance variable. Implement validation to make sure that the data entered is correct. Provide a method displayDate that displays the month, day and year separated by forward slashes (//. Write a test application

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!