Assignment10

Assignment10 - sense of direction does not change (i.e. the...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
7.10 – returnString is declared first off so that when the result is printed it starts with Exits: , next the key words in theHashMap Set are set equal to exits.keySet(). After this a for method runs through every key in the newly created string method and sets returnString’s next value as the exit, allowing the correct text to be printed out. 7.19 – Model-view-controller allows the separation of data and user interface concerns by decoupling data access and business logic from data presentation and user interaction, by introducing an intermediate component: the controller. -This is related to our game such that it would allow many things to go off smoothly in the program without affecting the user’s main screen/interface. It could be applied to improve the efficiency and correctness of the program. 7.22 (you can use the zuul-better project from the book's CD as the basis for your change) 7.26 – First off I would make the code so that every time you leave a room, it stores the direction you left in an array or something of the sort. Assuming that a person’s
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: sense of direction does not change (i.e. the direction they came from always being south would be changing) the stored directions could be remembered, and when called upon would go back the opposite direction of the one taken previously. The string would be taken off of the array and no new one would be added to avoid problems. 7.39 - (for your answer, include the definition of your enumerated type) 7.50 public enum Position { TOP, MIDDLE, BOTTOM; } 7.53 - (use one of the projects you used to answer a previous question in this assignment) Look up how to run your main method from the previous question from outside of BlueJ. Execute the game from the previous question outside of BlueJ. Then describe in writing how you did it. 7.56 No and no, error messages of invalid return type are given. 7.57 Yes it can, one possible way is every time that particular class is called, it calls another class which can be used to keep track of the number of time every class is called....
View Full Document

Ask a homework question - tutors are online