Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help me! I need this by midnight. Thank you so much!!!!! CS145-PROGRAMMING ASSIGNMENT #7 CARD ARRAY LIST OVERVIEW This program focuses on binary trees

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

image text in transcribed

Please help me! I need this by midnight. Thank you so much!!!!!

CS145-PROGRAMMING ASSIGNMENT #7 CARD ARRAY LIST OVERVIEW This program focuses on binary trees and recursion. INSTRUCTIONS Turn in file QuestionTree.java and optionally QuestionNode.java. (You may or majy not have QuestionNode.java class if you choose to include it inside Question Tree.java) You will need support files UserInterface.java, QuestionMain.java, VaderMain.java, and input text files from the Homework web page; place them in the same folder as your class. COLLECTABLE CARD In this assignment you will implement a yeso guessing game called "20 Questions." Each round of the game begins by you (the human player) thinking of an object. The computer will try to guess your object by asking you a series of yes or no questions. Eventually the computer will have asked enough questions that it thinks it knows what object you are thinking of. It will make a guess about what your object is. If this guess is correct, the computer wins; if not, you win. The computer keeps track of a binary tree whose nodes represent questions and answers. (Every node's data is a string representing the text of the question or answer.) A "question" node contains a left "yes" subtree and a right "no" subtree. An "answer" node is a leaf. The idea is that this tree can be traversed to ask the human player a series of questions. (Though the game is called "20 Questions," our game will not limit the tree to a height of 20. Any height is allowed.) For example, in the tree below, the computer would begin the game by asking the player, "Is it an animal?" If the player says "yes," the computer goes left to the "yes" subtree and then asks the user, "Can it fly?" If the user had instead said "no," the CS145-PROGRAMMING ASSIGNMENT #7 CARD ARRAY LIST OVERVIEW This program focuses on binary trees and recursion. INSTRUCTIONS Turn in file QuestionTree.java and optionally QuestionNode.java. (You may or majy not have QuestionNode.java class if you choose to include it inside Question Tree.java) You will need support files UserInterface.java, QuestionMain.java, VaderMain.java, and input text files from the Homework web page; place them in the same folder as your class. COLLECTABLE CARD In this assignment you will implement a yeso guessing game called "20 Questions." Each round of the game begins by you (the human player) thinking of an object. The computer will try to guess your object by asking you a series of yes or no questions. Eventually the computer will have asked enough questions that it thinks it knows what object you are thinking of. It will make a guess about what your object is. If this guess is correct, the computer wins; if not, you win. The computer keeps track of a binary tree whose nodes represent questions and answers. (Every node's data is a string representing the text of the question or answer.) A "question" node contains a left "yes" subtree and a right "no" subtree. An "answer" node is a leaf. The idea is that this tree can be traversed to ask the human player a series of questions. (Though the game is called "20 Questions," our game will not limit the tree to a height of 20. Any height is allowed.) For example, in the tree below, the computer would begin the game by asking the player, "Is it an animal?" If the player says "yes," the computer goes left to the "yes" subtree and then asks the user, "Can it fly?" If the user had instead said "no," the

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

Distributed Relational Database Architecture Connectivity Guide

Authors: Teresa Hopper

4th Edition

0133983064, 978-0133983067

More Books

Students also viewed these Databases questions