Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Theres no need for get/set methods such as getName(). Access the fields using variableName.fieldName. For example: { Employee e1 = new Employee(); e1.name = Susan

image text in transcribed

Theres no need for get/set methods such as getName(). Access the fields using variableName.fieldName. For example:

{

Employee e1 = new Employee();

e1.name = Susan Meyers;

e1.idNumber = 47899;

// and similar for department and position

}

java thanks
of 9 - ZOOM Task 2. Employee Class. (10 points) . Write a class named Employee that has the following public fields: name. The name field references a String object that holds the employee's name. IdNumber. The IdNumber is an int that holds the employee's ID number. department. The department field is a String that holds the name of the department where the a employee works position. The position field is a string that holds the employee's job title. There's no need for get/set methods such as getNarne(). Access the fields using variableName.fieldName. For example: : { 1 Employee et = new Employee(): e1.trie -'Susan Meyers": c1.IdNumber 47898 1 and similar for department and position 1 Once you have written the class, write a separate (main) program that creates three Employee objects to hold the following data Name ID Number Department Position Patel Koresh Accounting Smidge Crossbow 391 Jey Temple 2.4 Manufacturing Shift lead The program should store this data in the three objects and then display the data for each employee on the screen. Please remember to put your name and date of program completion at the top of both class files. Rubric: Student name and today's date is a comment in the first line of the programs: 5 points if falls . Employee dass defined correctly: 3 points Main program creates Employee variables correctly 1 point Threr Employer variables with correct data: 3 points

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

The Temple Of Django Database Performance

Authors: Andrew Brookins

1st Edition

1734303700, 978-1734303704

More Books

Students also viewed these Databases questions

Question

Communication and Cultural Variations?

Answered: 1 week ago