Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions