Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The class should have four attributes to represent a FactoryEmployee as follows: a . A name b . A job title c . A salary

The class should have four attributes to represent a
FactoryEmployee as follows:
a. A name
b. A job title
c. A salary (double)
d. A unique employee number
e. The type of work contract (With values of Whole
Time Or Part time)
Provide a default constructor to give default values
to all attributes except the unique employee
number. The employee number should be set to a
unique number.
ii. Provide a single constructor that should initialise the
name, job title, salary, and work contract type
attributes to values passed to the constructor and that
sets a unique value for their employee number.
iii. Provide a getter and a setter methods for the contract
type and salary attributes.
iv. Provide a printFactoryEmployee () method that prints
all the attributes for an Employee.

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

Step: 3

blur-text-image

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

Hands On Database

Authors: Steve Conger

1st Edition

013610827X, 978-0136108276

More Books

Students also viewed these Databases questions