Question
Michael Scott needs software to help manage his office staff. The size of his staff can be from 2 to infinity. For each staff member
Michael Scott needs software to help manage his office staff. The size of his staff can be from 2 to infinity. For each staff member he needs to store their first name, last name, position and skills. He wants to be able to print the following:
- The total of office staff
- A list of all the staff members last names only
- The staff member with the most skills
- The staff member with the least skills
The Class.java file should include:
- two constructors
- public member() that updates the count of staff members
- public member(String fName, String lName, String position) takes the first name, last name and position as arguments. It also updates the count of office members.
- Arraylist for the skills
- public ArrayListgetSkills() a getter method to return the arraylist of skills
- public void setSkills(String singleSkill) a method to add a single skill to the arraylist.
- public void setSkills(ArrayListmultipleSkills) a method to add multiple skills to the arraylist.
- A static variable to keep track of the staff count
- public static String getStaffCount() Returns a string with the number of staff
- All fields are private
- Getters and setters for fields not specified above
The Main.java file should include in the main method:
- The individual staff members will be created and stored in an arraylist here.
- After all the staff members are added, the staff count will be printed using the static method.
- The list of staff members will be printed (last name only)
- The staff member with the most skills will be printed
- The staff member with the least skills will be printed
//Positions are either Secretary, Salesman, Accountant, HR, CustomerRel, receptionist
//Skills are Communication, Typing, Research, Motivation, Telephone, Email, Technology
//1. Create staff member fName: Pam, lName: Beasley, positon: Secretary
//2. Add multiple skills to already created staff member: Typing, Telephone, Email
//3. Create another staff member without any initial info
//4. Add fName: Stanley
//5. Add lName: Hudson
//6. Add position: Salesman
//7. Add single skill: Motivation
//8. Add single skill: Telephone
//9. Use static method in class.java to display the number of staff members
//10. Display list of staff members (last name only)
//11. Display staff member with most skills and least skills
example output:
The number of staff members is _____
Staff members --- Last name only
----------------------------------------------
Beasly
Hudson
Staff members with the most skills
----------------------------------------------
Pam Beasley with 4 skills
Staff member with the least skills
----------------------------------------------
Stanley Hudson with 2 skills
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started