Question
Create a NetBeans project with the following characteristics. The project will be a menu-driven program where each menu item (other than Exit) will demonstrate an
Create a NetBeans project with the following characteristics. The project will be a menu-driven program where each menu item (other than "Exit") will demonstrate an application of arrays and ArrayLists. After each selection, except "Exit", the program will return to the main menu. The menu should look like this: *** MENU *** 1) Arrays 2) ArrayList 3) Rotate Array 4) Tic-Tac-Toe 5) Exit Your choice: For the first menu item, the program will create an int array, print the array, use Arrays.sort() to sort the array, and then print it again. The program will then create an array of String objects, print them, use Arrays.sort() to sort the array, and then print the sorted array. Label the outputs clearly and return to the main menu when done. For the second item, the program will create an ArrayList of String values, populate the ArrayList with ten (10) String objects, print the contents of the ArrayList, use Collections.sort() to sort the ArrayList values, and then print the contents again. Label the outputs clearly and return to the main menu when done. For the third item, create a two-dimensional array of int values, 3x3. Fill the array with distinct values. Print the array in a 3x3 format and then print it a second time with the values rotated (do not change the array, only the printing!). The output should look like this: Printing array: 0|1|2| 3|4|5| 6|7|8| Printing rotated: 6|3|0| 7|4|1| 8|5|2| Return to the main menu when done. For the fourth item, create a Tic-Tac-Toe game. Alternate between player one and player two. For each player, display the current state of the tic-tac-toe board, get their chosen space on the board, validate the space, and check whether the player has won the game. The game should continue until one player has won the game or until all nine spaces are used. Be sure to clearly label all outputs and to return to the main menu with the activity is complete. If you are not familiar with Tic-Tac-Toe, you can read the Wikipedia article here:https://en.wikipedia.org/wiki/Tic-tac-toe The final item on the menu is the Exit item. If the user chooses the to Exit, the program will end.
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