Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i have no idea. Please help me CSI: OOP-Lab-3 Follow the detail as provided below: 1. Within NetBeans project, create a package for lab 3.

i have no idea. Please help me image text in transcribed
CSI: OOP-Lab-3 Follow the detail as provided below: 1. Within NetBeans project, create a package for lab 3. 2. In the package, add an interface named EmployeeRules, which defines two methods: getName) and get Salaryo. 3. Create a class named Employee. It implements the interface of EmployeeRules. It has two data members name and salary. It has a constructor that accepts data and initializes the name and salary. It has a default constructor It has a getName() method that outputs the name of the Employee It has a getSalary method that outputs the salary of the Employee It has a toString() method to output the Employee information 4. Create a class named Faculty. It inherits class Employee It has an extra private field named courses, which is an array that holds the courses taught by this faculty member. (For cach course, just store the course name as a String.) It has a constructor that accepts three parameters: name, salary, and courses. Notice that name and salary can be initialized using the constructor of the superclass. Notice that the input parameter courses is plural It overrides the getName() method of Employee, and precedes the name with the word "Professor" It has a public accessor get Courses that returns an array of courses. Be sure to return a copy It has a public accessor get CourseNames that gets all of the course names as a string. . It has a public mutator to the field courses. Be careful with the array size, and with storing copies It has a toString() method to output the Faculty information 5. Create a class called Test. This class just has a main method. In this method, it: Instantiates a Faculty reference to a variable of type Faculty. Then it calls each of the methods described above, including getName(.getSalaryo. and the accessor and mutator to field courses in class Faculty and see what happens. Instantiates an Employee variable that references a new Faculty. Then it calls cach of the methods described above, including getName().getSalary, and the accessor and mutator to field courses in class Faculty and see what happens Instantiates an EmployeeRules variable that references a new Faculty. Then it calls each of the methods described above, including getName().getSalary, and the accessor and mutator to field courses in class Faculty and see what happens. Dashboard Calendar To Do Notifications Inbox

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

Oracle 11G SQL

Authors: Joan Casteel

2nd Edition

1133947360, 978-1133947363

More Books

Students also viewed these Databases questions

Question

4. How does eff ective listening diff er across listening goals?

Answered: 1 week ago

Question

=+How should it be delivered?

Answered: 1 week ago

Question

=+4 How does one acquire a global mindset?

Answered: 1 week ago