Question: COM 2 2 2 4 : DATA STRUCTURES AND ALGORITHMS DUE DATE: 1 1 OCTOBER 2 0 2 4 INSTRUCTIONS: GROUP YOURSELVES INTO GROUPS OF
COM : DATA STRUCTURES AND ALGORITHMS
DUE DATE: OCTOBER
INSTRUCTIONS:
GROUP YOURSELVES INTO GROUPS OF
Assignment Title:
Design and Implement a Game that AutoSolves Using Multiple Sorting Algorithms
Objective:
This assignment aims to deepen students' understanding of various sorting algorithms by
applying them in a practical scenario. Students will design a simple puzzle game that auto
solves itself by sorting userinput elements using different sorting algorithms.
Instructions:
Game Design:
Design a simple game that allows the user to enter an unsorted array of
integers.
The game will then prompt the user to choose one of the following sorting
algorithms to solve the puzzle:
Bubble Sort
Insertion Sort
Selection Sort
Quick Sort
Merge Sort
Game Functionality:
The game should:
Accept a custom input of integers from the user.
Allow the user to select one sorting algorithm from the list above.
Visually demonstrate each step of the chosen sorting algorithm,
showing how the array is transformed during the sorting process.
Display the final sorted array.
Sorting Algorithms:
Implement each of the following sorting algorithms in Java:
Bubble Sort: Repeatedly steps through the list, compares adjacent
elements, and swaps them if they are in the wrong order.
Insertion Sort: Builds the sorted array one element at a time, picking
elements from the unsorted part and inserting them into the correct
position.
Selection Sort: Repeatedly finds the minimum element from the
unsorted part and places it at the beginning.
Quick Sort: Selects a pivot element, partitions the array into sub
arrays with elements less than and greater than the pivot, and
recursively sorts the subarrays.
Merge Sort: Divides the array into halves, recursively sorts each half,
and merges the sorted halves.
Game Requirements:
The game should provide clear instructions to the user for inputting the array
and selecting a sorting algorithm.
The game should visually display the array's state after each significant step in
the chosen sorting process.
The final sorted array should be clearly presented to the user.
Code Quality:
Use meaningful variable and method names.
Include comments to explain your code.
Ensure that your code is wellorganized, modular, and easy to read.
Deliverables:
Source Code: Submit the complete source code of your game.
Report: Submit a report pages that includes:
A description of how you implemented the game.
An explanation of each sorting algorithm and how it was integrated
into the game.
Screenshots of the game in action, showing the sorting steps.
Any challenges faced and how they were resolved.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
