Question: Q3)Try writing this part of a program in java A) Define an array of double called Salaries to store the salary of 30 employees. Ask

Q3)Try writing this part of a program in java

A) Define an array of double called Salaries to store the salary of 30 employees. Ask the user to enter the salaries and store them in the array and then use predefined methods to implement the following: a) Sort the salaries. b) Ask the user to enter a salary and search for it in the array Salaries. c) Define another double array with size 15 and copy to it the first 15 elements from the Salaries array.

B) Define a collection ArrayList to store the students' names. Take 10 students names from the user and store them in the collection. Add two student names to the collection and remove a student name. Insert a student name in fifth place in the collection. Sort the names alphabetically. Ask the user to enter a student name and search for it in the collection and prints the result as Exist or Not Exist. Trim the excess items from the collection. Print the whole collection using the enhanced for loop.

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!