Question: Use java please and follow the instructions for the 3 activities carefully. Thank you! Activity 1: Write a program called ManipInts that declares and instantiates
Activity 1: Write a program called ManipInts that declares and instantiates an ArrayList to hold integers. Fill the arrayList with 10 random numbers from 1 to 10 Then output the random numbers with their index position (the first number is index 0). After displaying the list, ask the user for a position to insert a number and then insert that number into the correct position. Output the updated list including the index positions. Lastly, ask the user which position they would like to remove. Remove that element and then display the updated list with index positions included **Take notice of what happens when you add/remove at specific locations What do the elements do when you insert into a specific location and what do the elements do when you remove a specific location? Activity 2: Write a program called ManipDoubles that declares and instantiates an ArrayList to hold doubles. Ask the user for 5 doubles. Then output the Arraylist using an enhanced for loop which includes the index positions. Then ask the user which two positions they would like to add and display the sum of those two positions Activity 3: Update your SuperHero vs. Villain story so that the user can enter in as many Super Heroes and as many Villains as they want. Then during the battle one Super Hero and one Vill ain will battle until one of them reaches a health of zero. The winner will then battle the next Super Hero or Villain in the list The last Super Hero or Villain will determine if the Super Heroes or Vill ains won as a whole unit
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
