Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I am working on an Employee Program. The user adds either a commissionEmployee,

ID: 3627320 • Letter: I

Question

I am working on an Employee Program. The user adds either a commissionEmployee, SalaryEmployee, or HourlyEmployee. So I get all that data and use a for loop to display everyone that has been entered into the program.

However I have a submenu that will display only 1 type out of the 3. Ex:

1. Submenu
Display:
1. Hourly
2. Salary
3. Commission

Yes I know how to display every array I created of each type all at the same type. Yet I am not sure how to display only hourly or only salary or only commission??

Explanation / Answer

If you wish to only print one of the 3 arrays, instead of all then try using a switch statement to see which one the user wants to print and then print that one. Or you could use a if else statement if you prefer.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote