Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:

  1. two constructors
    1. public member() that updates the count of staff members
    2. 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.
  2. Arraylist for the skills
    1. public ArrayListgetSkills() a getter method to return the arraylist of skills
    2. public void setSkills(String singleSkill) a method to add a single skill to the arraylist.
    3. public void setSkills(ArrayListmultipleSkills) a method to add multiple skills to the arraylist.
  3. A static variable to keep track of the staff count
  4. public static String getStaffCount() Returns a string with the number of staff
  5. All fields are private
  6. Getters and setters for fields not specified above

The Main.java file should include in the main method:

  1. The individual staff members will be created and stored in an arraylist here.
  2. After all the staff members are added, the staff count will be printed using the static method.
  3. The list of staff members will be printed (last name only)
  4. The staff member with the most skills will be printed
  5. 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

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

Formal SQL Tuning For Oracle Databases Practical Efficiency Efficient Practice

Authors: Leonid Nossov ,Hanno Ernst ,Victor Chupis

1st Edition

3662570564, 978-3662570562

More Books

Students also viewed these Databases questions