Must Be In JAVA. Please Attached Text Code And Output Create A New Project And Name It “Lab10” Write A Program To: Save The Following Menu To A String Var Named Menu: [0] Quit [1] Generate A Random ArrayList Of Ints Of Size And Limits [2] Display The Arra

匿名用户 最后更新于 2021-12-01 19:36 计算机类Computing

Must be in JAVA. Please Attached text code andoutput

  1. Create a new project and name it “Lab10”
  2. Write a program to:
  3. Save the following menu to a string var named menu:

[0] Quit

[1] Generate a random ArrayList ofints of size and limits

[2] Display the ArrayList on thescreen: use enhanced “for”

[3] Count and return occurrences of avalue in the ArrayList

[4] Compute summation of theArrayList

[5] Compute average of theArrayList

[6] Replace a certain number withanother in the ArrayList

[7] Sort the ArrayList

[8] Return sub-list using start andfinish indexes

  1. Use while-loop, loop until user chooses to quit
  2. Display the menu
  3. Ask the user to select on option
  4. Use switch statement to
  5. Ask the use for the input based on the case
  6. Execute the right operation based on the user’s option
  7. Display the result of operation
  8. Repeat
  9. MUST implement each case as a separatemethod
  10. Test all options and screen capture the output

已邀请: