Answered step by step
Verified Expert Solution
Question
1 Approved Answer
ALL OF THIS USING JAVA, PLEASE SOLVE ALL IT'S AN EMERGENCY Task 1 Create a Java application representing a simple game based on the Binary
ALL OF THIS USING JAVA, PLEASE SOLVE ALL IT'S AN EMERGENCY
Task 1 Create a Java application representing a simple game based on the Binary Search Tree ADT, as follows: Step1: Create a randomly generated BST using the class BinarySeacchtree This BST will contain 40 strings. Each string consists of two letters that are randomly generated. Step2: The user is asked to find and mark two nodes that contain two strings, where one is the reverse of the other. For example: Tree 1 In the example above, CF and FC are the reverse of each other, se the user should mark them to win. Step3: The user will be prompted to navigate through the tree. At the beginning, the navigation will start from the root. Each time a node is visited, the string of the node will be printed. The user will navigate using one of the following commands: L to move left R to move right B to go back (go back to the previously visited node) M to mark the node Step4: If the user marks 2 nodes that satisfy the winning condition (being the reverse of each other), then he/she will be declared as a winner. Otherwise he will keep navigating through the tree. For example: here is a sample output assuming Tree 1Step 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