I am having problems with : If 6 is selected, then you will get an employee...

50.1K

Verified Solution

Question

Programming

I am having problems with :

If 6 is selected, then you will get an employee payamount from the user. This will be a double. Only allow them toenter one pay amount and then display the main menuagain.

AND:

if 2 is selected you will promt the user for a grade(double) from 0-100. Only allow them to enter one grade and thendisplay the main menu again

The project:

Create a project called P03. Inside of P03 you’re going to havefour classes: 1) EntrySystem.java...

(3 bookmarks)

Create a project called P03. Inside of P03 you’re going to havefour classes:
1) EntrySystem.java (which will contain your main method)

2) Person.java which will be your super class will have thefollowing properties:
first name (string)
last name (string)
id number (string)
phone (string)
street address (string)
city (string)
state (string)
zip (string)

3) Student.java will inherit from Person and will have thefollowing additional properties:
major (string)
grades (Arraylist of doubles)
advisor (string)

Student will also have a method called displayStudent() whichwill display all of the students information as well as their GPAin a neatly formatted way

. 4) Employee.java will inherit from Person and will have thefollowing additional properties:
department (string)
supervisor (string)
paychecks (ArrayList of doubles)

Employee will also have a method called displayEmployee() whichwill display all of the employees information as well as their payaverage and pay total in a neatly formatted way. You can also addand use the HelperClass.java.
You'll create two interfaces:
PayrollInterface.java with the following methods:
AddCheckAmount(double check)
GetPayTotal()
GetPayAverage()

GradesInterface.java with the following methods:
AddNumericalGrade(double grade)
CalculateGPA()

you will use Student to create an ArrayList of Student Java Objectscalled students, and Employee to create an ArrayList of EmployeeJava Objects called employees.

In EntrySystem.java you’ll have a menu with the followingoptions:
1) Add a Student
2) Add a Student Grade
3) View All Students
4) Clear all Students
5) Add an Employee
6) Add an Employee Pay Amount
7) View All Employees
8) Clear All Employees
9) Exit
If 1 is selected,you will prompt the user for each field of theStudent class to enter. You will validate strings to make sure theyare not empty. You will validate ints and doubles to make sure theyare proper ints and doubles. You will then add the Student Objectto an ArrayList called students, returning the user back to themenu. Feel free to use the Helper Class we've been workingwith.

HELP
If 2 is selected you will promt the user for a grade(double) from 0-100. Only allow them to enter one grade and thendisplay the main menu again.

If 3 is selected, you will display the list of students in a neatlyformatted way by looping through students and callingdisplayStudent() for each. If there are no students entered, thentell the user this.

If 4 is selected, you will clear the students ArrayList.

If 5 is selected, then you will prompt the user for each field toenter for the Employee class. You will validate strings to makesure they are not empty. You will validate doubles to make surethey are proper doubles.

HELP
If 6 is selected, then you will get an employee pay amountfrom the user. This will be a double. Only allow them to enter onepay amount and then display the main menu again.

If 7 is selected, you will display the list of employees in aneatly formatted way calling displayEmployee() for each. If thereare no employees, then tell the user this.

If 8 is selected, you will clear the employees ArrayList.

When 9 is selected, you will exit the program.

HELP PLEASE

Answer & Explanation Solved by verified expert
4.4 Ratings (606 Votes)
Personjavapackage P03public class Person fields private String firstName private String lastName private String idNumber private String phoneNumber private String streetAddress private String city private String state private String zip param firstName param lastName param idNumber param phoneNumber param streetAddress param city param state param zip public PersonString firstName String lastNameString    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students