Define a variation on StringLinkedListSelfContained from Listing 12.7 that stores objects of

Define a variation on StringLinkedListSelfContained from Listing 12.7 that stores objects of type Employee, rather than objects of type String. Write a program that uses this linked-list class to create a linked list of Employee objects, asks the user to enter an employee’s Social Security number, and then searches the linked list and displays the data for the corresponding employee. If no such employee exists, display a message that says so. The user can enter more Social Security numbers until indicating an end to the program. The class Employee is described in Programming Project 6 of Chapter 9. If you have not already done that project, you will need to define the class Employee as described there.

Programming Project 6 of Chapter 9

Write a program to enter employee data, including Social Security number and salary, into an array. The maximum number of employees is 100, but your program should also work for any number of employees less than 100. Your program should use two exception classes, one called SSNLengthException for when the Social Security number entered without dashes or spaces—is not exactly nine characters and the other called SSNCharacterException for when any character in the Social Security number is not a digit. When an exception is thrown, the user should be reminded of what she or he entered, told why it is inappropriate, and asked to reenter the data. After all data has been entered, your program should display the records for all employees, with an annotation stating whether the employee’s salary is above or below average. You will also need to define the classes Employee, SSNLengthException, and SSNCharacterException. Derive the class Employee from the class Person in Listing 8.1 of Chapter 8. Among other things, the class Employee should have input and output methods, as well as constructors, accessor methods, and mutator methods. Every Employee object should record the employee’s name (as defined in Person), salary, and Social Security number, as well as any other data you need or think is appropriate.

Listing 12.7

 

Stressed over that homework?

Essay deadline breathing down your neck?

Let’s cut to the chase: Why struggle when you can ace it with zero hassle?

Whether it’s essays, research papers, or assignments — we’ve got you covered.

✅ Expert writers
✅ 100% original work
✅ No AI tools, just real pros

Stressed about your essay or homework? Get a top-quality custom essay NOW!!! Stop worrying. Start succeeding.

GradeEssays.com
We are GradeEssays.com, the best college essay writing service. We offer educational and research assistance to assist our customers in managing their academic work. At GradeEssays.com, we promise quality and 100% original essays written from scratch.
Contact Us

Enjoy 24/7 customer support for any queries or concerns you have.

Phone: +1 213 3772458

Email: support@gradeessays.com

© 2024 - GradeEssays.com. All rights reserved.

WE HAVE A GIFT FOR YOU!

15% OFF 🎁

Get 15% OFF on your order with us

Scroll to Top