Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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) image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional IPhone And IPad Database Application Programming

Authors: Patrick Alessi

1st Edition

0470636173, 978-0470636176

More Books

Students also viewed these Databases questions

Question

What attracts you about this role?

Answered: 1 week ago

Question

How many states in India?

Answered: 1 week ago

Question

HOW IS MARKETING CHANGING WITH ARTIFITIAL INTELIGENCE

Answered: 1 week ago