Part 2: Haunted House Requirements The figure below is called a graph. The circle are called nodes and the lines are called edges. An edge connects two nodes. You can interpret the graph as a haunted house containing rooms and passages between rooms. The nodes can be thought of as rooms, and an edge connects one room to another. Note that each node could have, at most, four edges. Start B E F K H Exit North ↑ Write a program that implements the haunted house using references to instances of a Node class. Each node in the graph will correspond to an instance of Node. The edges correspond to links that connect one node to another and can be represented in Node as instance variables that reference another Node class. Start the user in node A. The user's goal is to get to the exit in node L. The program should output possible moves in the north, south, east, or west direction. 1. Select the Suitor. 2. Escape the Haunted House. 3. Sentiment Analysis. Q. Quit. Your option ==>2 Escape the Haunted House. You are in room A of the Haunted House. N You can't go in that direction! You can go east or south. You are in room A of the Haunted House. You can go east or south. E You are in room B of the Haunted House. You can go west, south or east. S You are in room F of the Haunted House. You can go north or east. You are in room L of the Haunted House. You made it out alive! Sample Output

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Write the full Java code

Part 2: Haunted House Requirements
The figure below is called a graph. The circle are called nodes and the lines are called edges. An edge connects two nodes. You can interpret the graph as a haunted house containing rooms and passages between rooms. The nodes can be
thought of as rooms, and an edge connects one room to another. Note that each node could have, at most, four edges.
Start
B
E
F
K
H
Exit
North
↑
Write a program that implements the haunted house using references to instances of a Node class. Each node in the graph will correspond to an instance of Node. The edges correspond to links that connect one node to another and can be
represented in Node as instance variables that reference another Node class. Start the user in node A. The user's goal is to get to the exit in node L. The program should output possible moves in the north, south, east, or west direction.
1. Select the Suitor.
2. Escape the Haunted House.
3. Sentiment Analysis.
Q. Quit.
Your option ==>2
Escape the Haunted House.
You are in room A of the Haunted House.
N
You can't go in that direction!
You can go east or south.
You are in room A of the Haunted House. You can go east or south.
E
You are in room B of the Haunted House.
You can go west, south or east.
S
You are in room F of the Haunted House.
You can go north or east.
You are in room L of the Haunted House. You made it out alive!
Sample Output
Transcribed Image Text:Part 2: Haunted House Requirements The figure below is called a graph. The circle are called nodes and the lines are called edges. An edge connects two nodes. You can interpret the graph as a haunted house containing rooms and passages between rooms. The nodes can be thought of as rooms, and an edge connects one room to another. Note that each node could have, at most, four edges. Start B E F K H Exit North ↑ Write a program that implements the haunted house using references to instances of a Node class. Each node in the graph will correspond to an instance of Node. The edges correspond to links that connect one node to another and can be represented in Node as instance variables that reference another Node class. Start the user in node A. The user's goal is to get to the exit in node L. The program should output possible moves in the north, south, east, or west direction. 1. Select the Suitor. 2. Escape the Haunted House. 3. Sentiment Analysis. Q. Quit. Your option ==>2 Escape the Haunted House. You are in room A of the Haunted House. N You can't go in that direction! You can go east or south. You are in room A of the Haunted House. You can go east or south. E You are in room B of the Haunted House. You can go west, south or east. S You are in room F of the Haunted House. You can go north or east. You are in room L of the Haunted House. You made it out alive! Sample Output
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education