ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 12 Weeks Ago, 2 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 06 Jun 2017 My Price 9.00

Gameof20 program

Hey there! Here is a question which is supposed to be answered in Java Language and on ECLIPSE Platform.

It is the Gameof20 program. TEST CASES are also required for each and every method that is used.

I am attaching the document. Please have a look at it.

Thank You.

 

Game of Twenty QuestionsCollaboration: Complete this by yourself. You may get help from Section Leaders or RickCredits:This project is one of several resulting from theApprenticeship learningapproach of OwenAstrachan (Duke), Robert Smith (North Carolina Central), James Wilkes (Appalachian State), and theirstudents with support in part by the National Science Foundation Grant #DUE-9954910. This assignmentprovides practice with trees, recursion, file input, file output, and a linked hierarchical data structure--specifically, a binary tree.Game of Twenty Questions:The game ofTwenty Questionscan be amusing, especially if the domain ofquestions is one that you find interesting. For this assignment you will write a program that permits the userto play a dynamic version of twenty questions -- the user can add new questions and answers. You areasked to invent your own questions and answers. The detailed dialog below deals with animals, but youmay develop your own theme and your own questions and answers.Details:In order to run this game with our GUI, we have designed aGameTreetype. The beginning ofthe GameTree class is provided to ensure all methods have correct method signatures. First get a start to allfiles needed for this project fromhttp://www.cs.arizona.edu/people/mercer/Projects/GameOf20Start.zipChoice.javaenum Choicelets us useChoice.YesandChoice.Norather than case sensitive stringsGameTree.javapublic class GameTreehas all methods written as stubs. Each method iscommented.-publicGameTree(String name)-publicStringtoString()-publicvoidadd(String newQuestion, String newAnswer)-publicbooleanfoundAnswer()-publicStringgetCurrent()-publicvoidplayerSelected(Choice yesOrNo)-publicvoidreStart()-publicvoidsaveGame()// Do this method lastGameTreeSmallTest.javaThe beginning of a unit test with a commentedtestSaveGamemethodRecommended: Get these three methods working first:1.Constructor that takes a file name and should call a recursive method to build the binary tree in a preorder fashion.2.getCurrent()to return the data at the current node3.playerSelected(Choice yesOrNo)which is way to go left or right down the treeFile input:The questions and answers must be stored in a binary tree data structure withStringelements(no generics necessary). We also ask that you add a constructor that uses the build method that reads froman input file to build the game tree. Input consists of a text file with questions and answers. The input fileuses the following schema:Question?Yes Answer (left subtree)No Answer (right subtree)The input file must have "?" at the end of questions and the answers must not have "?" at the end of theanswer. For exampleactors.txtmay have these two questions and three answers:Is the actor male?Sean ConneryDid she star in The Bourne Ultimatum?Julia StilesKate Winslet

Attachments:

Answers

(11)
Status NEW Posted 06 Jun 2017 12:06 AM My Price 9.00

-----------

Not Rated(0)