I you will write an object-oriented program to explore a series of rooms in a video...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
I you will write an object-oriented program to explore a series of "rooms" in a video game. To begin, use the final exam module to set up the "rooms" by running the following code: starting_room - cs0002_final_exam_module.generate_maze() The variable 'starting_room' is an object of class "Room" with the following properties & methods: get monster() - A method that takes no arguments and returns the name of a monster that lives in this room (string) • get_gold() - A method that takes no arguments and returns how much gold can be found in this room (integer) • north - An instance variable that points to the room directly above this room. This room will also be an object of the class "Room". If there is no room above this variable is set to the value None. • south - An instance variable that points to the room directly below this room. This room will also be an object of the class "Room". If there is no room above this variable is set to the value None. • east - An instance variable that points to the room directly to the right of this room. This room will also be an object of the class "Room". If there is no room above this variable is set to the value None. • west - An instance variable that points to the room directly to the left of this room. This room will also be an object of the class "Room". If there is no room above this variable is set to the value None. Here is a map of all of the rooms - note that the given variable "starting_room" is in the center of the map. Room1 Room4 Room6 Room2 Room7 Room10 Room11 Starting Room Room3 Room5 Room8 Room9 Room12 Your task is to answer the following question using the "starting_room" object described above: I you will write an object-oriented program to explore a series of "rooms" in a video game. To begin, use the final exam module to set up the "rooms" by running the following code: starting_room - cs0002_final_exam_module.generate_maze() The variable 'starting_room' is an object of class "Room" with the following properties & methods: get monster() - A method that takes no arguments and returns the name of a monster that lives in this room (string) • get_gold() - A method that takes no arguments and returns how much gold can be found in this room (integer) • north - An instance variable that points to the room directly above this room. This room will also be an object of the class "Room". If there is no room above this variable is set to the value None. • south - An instance variable that points to the room directly below this room. This room will also be an object of the class "Room". If there is no room above this variable is set to the value None. • east - An instance variable that points to the room directly to the right of this room. This room will also be an object of the class "Room". If there is no room above this variable is set to the value None. • west - An instance variable that points to the room directly to the left of this room. This room will also be an object of the class "Room". If there is no room above this variable is set to the value None. Here is a map of all of the rooms - note that the given variable "starting_room" is in the center of the map. Room1 Room4 Room6 Room2 Room7 Room10 Room11 Starting Room Room3 Room5 Room8 Room9 Room12 Your task is to answer the following question using the "starting_room" object described above:
Expert Answer:
Answer rating: 100% (QA)
Answer Certainly Based on the description of the Room class and its propertiesmethods heres an examp... View the full answer
Related Book For
Business Communication Essentials a skill based approach
ISBN: 978-0132971324
6th edition
Authors: Courtland L. Bovee, John V. Thill
Posted Date:
Students also viewed these programming questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Company Revenue for Fiscal Year 2014 (millions of dollars) Walmart 476,294 Exxon Mobil 407,666 Apple 170,910 General Motors 155,427 Ford Motor 146,917 General Electric 146231 Identify and explain...
-
The following is a sufficient condition, the Laplace-Liapounoff condition, for the central limit theorem: If X 1 , X 2 , X 3 , . . . is a sequence of independent random variables, each having an...
-
If a patient needs 33 mg of medicine, how many ml do you administer?
-
Why would focusing only on the jobs currently held by people in an area tend to overstate the benefits to protectionism? Why do the numbers of those who lose jobs from eliminating trade restrictions...
-
Explain the term private placement. What are its advantages and disadvantages within the financial markets?
-
The following data give the starting salary for students who recently graduated from a local university and accepted jobs soon after graduation. The starting salary, grade-point average (GPA), and...
-
We have defined a PyTorch network class DAN for you. You need to implement the forward pass for your deep averaging network. To start, first implement average that averages the words in a review and...
-
Implement the following LP problem in a spreadsheet. Use Solver to solve the problem and create a Sensitivity Report. Use this information to answer the following questions: MAX: 4X1 + 2X2 Subject...
-
The design and layout of a supermarket, including the way merchandise is displayed within the various categories is key to the success of any supermarket. For your selected supermarket Identify and...
-
In 2009, just four months after Najib Razak was elected Prime Minister of Malaysia, 1Malaysia Development Berhad (1MDB) was created. The wealth fund was established for development projects to better...
-
4. Let f be the function defined as follows: [lx-31 + 1, ax + bx, f(x) = {1x x < 3 x = 3 (a) If a = 3 and b = 2, is f continuous for all x? Justify your answer. (b) Describe all values of a and b for...
-
Examine Vikram Malik's monthly financial forecast Why do Guna's financial requirements vary across the year? What are the key determinants of Guna's borrowing needs?
-
Beethoven's Piano Rebuilding Company has been operating for one year. On January 1, at the start of its second year, its income statement accounts had zero balances and its balance sheet account...
-
Calculate the total interest on a mortgage paid monthly : Amount of loan = 225,024 Annual interest rate = 8% Length of loan = 20 years Round your answer to the nearest hundredth. Enter your answer as...
-
In the experiment (Differential amplifier) answer the following: Theoretical Calculations: 5. Name five other application for op- amp, sketch their circuit and their equations?
-
Give the structural formulas of the alkenes that, on ozonolysis, give: a. (CH3)2C=O and CH2=O b. Only (CH3CH2)2C=O c. CH3CH=O and CH3CH2CH=O d. O=CHCH2CH2CH2CH=O
-
Read the step by- step hints and examples for writing a funding proposal at www.learnerassociates.net/proposal. Review the entire sample proposal online. What details did the writer decide to include...
-
If you lack one important qualification for a job but have made it past the initial screening stage, how should you prepare to handle this issue during the next round of interviews? Explain your...
-
The following email message about travel budget cutbacks at Black & Decker contains numerous blunders. Using what you've learned in the chapter, read the message carefully and analyze its faults....
-
Using the knowledge you gained from your interview in mini case 1 , design an interface for the individual you interviewed. What interface design modifications are you making so that the program will...
-
A portfolio on the capital market line with returns greater than the returns on the market portfolio represents a(n): A. Lending portfolio. B. Borrowing portfolio. C. Unachievable portfolio.
-
Highly risk-averse investors will most likely invest the majority of their wealth in: A. Risky assets. B. Risk-free assets. C. The optimal risky portfolio.
Study smarter with the SolutionInn App