Question: Prac 3: ArrayLists a) Write a simple program to store some Employee objects in an ArrayList. Then display all the details of the objects in

 Prac 3: ArrayLists a) Write a simple program to store some

Prac 3: ArrayLists a) Write a simple program to store some Employee objects in an ArrayList. Then display all the details of the objects in the ArrayList. Use the JQptionPane class for output. b) Use the JOptionPane class to display only the name and surname of employees whose surname starts with the letter 'M'. (Ensure that you have at least 2 such employees in the list). Advanced: modify this functionality so that the start letter is not hard-coded, but the user can specify any letter, using the JoptionPane class for input. c) Remove all employees whose salary is less than or equal to R5000. Then, using the JOptionPane class, display all the details of the remaining objects in the list. d) Try to sort the contents of the list in alphabetical order of surname. Then, using the JOptionPane class, display all the details of the objects in the list. e) Try to sort the contents of the list in ascending order of salary. Then, using the JOptionPane class, display all the details of the objects in the list

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!