Homework Help Question & Answers
JAVA Assume that you are developing an Employee class with idNum, firstName, and lastName. – Now,…
JAVA
Assume that you are developing an Employee class with idNum, firstName, and lastName. – Now, you want to keep the Employee objects in an ArrayList. – Develop the correct equals() method of the Employee class.
Sample Run
1. Input a number: 100
2. Input a name: Tom
3. More items?(Y/N) y
4. Input a number: 200
5. Input a name: John
6. More items?(Y/N) n
7. The list contains:
8. 100 Tom
9. 200 John
10. Type the number and name to search
11. Number: 100
12. Name: Tom
13. 100 Tom is in the list
14. More search?(Y/N) n
15. Type the number and name to remove
16. Number: 100
17. Name: Tom
18. 100 Tom is removed from the list
19. The list contains:
20. 200 John
21. More remove?(Y/N) n
Add a comment