Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Use java please and follow the instructions for the 3 activities carefully. Thank you! image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Expert Oracle Database Architecture

Authors: Thomas Kyte, Darl Kuhn

3rd Edition

1430262990, 9781430262992

More Books

Students also viewed these Databases questions

Question

How does XBRL facilitate Data Analytics by analysts?

Answered: 1 week ago