Question
Write a Java application that contains the following: 1- A static method named sortANDduplicate that receives an unsorted list of integers of type ArrayUnsortedList class.
Write a Java application that contains the following: 1- A static method named sortANDduplicate that receives an unsorted list of integers of type ArrayUnsortedList class. Your method should sort the list, duplicate even numbers, and increase odd numbers by 2 if any exist, in the given list. Keep the list unchanged if the number of elements are less than 3. 2- A main method that creates an unsorted list of integers. Fill the list with any number of integers from the user. Print the list on screen. Use sortANDduplicate method to change the list. Then print the list after calling the method. Hint: Use ArraySortList to sort the list. As example if the list: List: 10, 20 after calling it becomes, list: 10, 20 List: 5, 4, 20, 15, 10, 3 after calling it becomes, List: 4, 4, 5, 7, 10, 10, 17, 20, 20
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started