Question: In JAVA, please write code and follow all directions Textbook 7ed. P732 Q6 of PROGRAMMING PROJECTS(Savitch 7th edition) as listed below: Write a program to
In JAVA, please write code and follow all directions
Textbook 7ed. P732 Q6 of PROGRAMMING PROJECTS(Savitch 7th edition) as listed below:
Write a program to enter employee data, including SSN (Social Security Number) and salary into an array with maximum # of 100. Allow to enter less than 100 employees.
The program should use two exception class,
one called: SSNLengthException when SSN entered without 2 dashes and not 9 digits
one called: SSNCharacterException when SSN entered has non digits
When an exception is thrown, tell user what is entered and why it is wrong, ask reenter again.
After all data has been entered, display the records for all employees in console statement, with an annotation stating whether the employees salary is above or below average.
Design the THM class derived from book sample class Person, then add all required private variables, constructors, getters (accessor), setters (mutator), and methods of override, and overload types.
The program source should be appropriately indented, points will be cut for unconventional, rude and messy codes.
The program begins with one O/P statement in GUI, to display the title, author, and ID
The program should be user friendly, informative, and display clear statements, points will be cut heavily if this specs not met.
EDIT: this should be the person class but I am not sure

Postcondi tion: This object popu lation was updated to reflect one year's change. Other data values are unchanged 15. An accessor method is a public method tha returns the data from a private instance variable. The name of an accessor method typically begins with get. A mutator method is a public method that changes the data stored in one or more private instance variables. The name of a mutator method typically begins with set. 16. import java.util.Scanner; public class Person private String name; private int age public void setName(String newName) name newName 370 CHAPTER 5/Defining Classes and Methods public void setAge(int newAge) if (newAge 0) age-newAge; else System.out.println("'ERROR: Age is " + "negative." System.exit(0) public void setPerson (String newName, int newAge) setName (newName); setAgeCnewAge) public String getName O return name public int getAgeO return age; 17. Yes. See Listing 5.15 for an example. 18. No effect at all. The two statements are equivalent in this context. 19. A well-encapsulated class definition logically separates into class interfa and implementation. A programmer should be able to use the class kno ing only the information given in the class interface and should need know nothing about the implementation. 20. Instance variables should always be private. 21. If a method is a helping method that is used only within the definitions other methods, it should be private. 22. No, it is part of the implementation. 23. No, it is part of the implementation. 24. A reference type is a type whose variables hold references-that is, memo addresses-as opposed to actual values of obiects, Class types are ref
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
