NOTE: For this question, create all the assets for your solution in a package named quest Name your classes precisely as specified and follow the spec closely. We'll be using some automated tests to validate your code. Assume "good" data; no exception handling is expected or required. We're building an old-school text adventure game. For our first prototype, we need to keep track of Rooms and items for the Game. Create a class called Room. Room instances have names and some collection that allows it to manage/track the items in the room. The "items" are represented as Strings. Your Room class should have a public constructor that matches the following signature: public Room (String name, String [] items) The items argument may be null (meaning the room is empty). Rooms can also give us other information. We can query if a room is empty and/or if a room contains a certain item. Your Room should support the following operations: public boolean isEmpty() public boolean contains(String nameOf Item) We can compare Rooms for equality. In this case, we define rooms as "equal" if the names are the same. Be sure to provide a .equals() override. (Note: You can also provide a hashCode override, but it is not required for this question and no penalty assessed if you do not provide one) public boolean equals(Object other)
NOTE: For this question, create all the assets for your solution in a package named quest Name your classes precisely as specified and follow the spec closely. We'll be using some automated tests to validate your code. Assume "good" data; no exception handling is expected or required. We're building an old-school text adventure game. For our first prototype, we need to keep track of Rooms and items for the Game. Create a class called Room. Room instances have names and some collection that allows it to manage/track the items in the room. The "items" are represented as Strings. Your Room class should have a public constructor that matches the following signature: public Room (String name, String [] items) The items argument may be null (meaning the room is empty). Rooms can also give us other information. We can query if a room is empty and/or if a room contains a certain item. Your Room should support the following operations: public boolean isEmpty() public boolean contains(String nameOf Item) We can compare Rooms for equality. In this case, we define rooms as "equal" if the names are the same. Be sure to provide a .equals() override. (Note: You can also provide a hashCode override, but it is not required for this question and no penalty assessed if you do not provide one) public boolean equals(Object other)
Chapter18: Maintaining And Querying A Database
Section: Chapter Questions
Problem 11QY
Related questions
Question
question in java please!
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you