Question: Need help coding this. Project Description This first project is meant to ensure that you are able to apply and extend your prerequisite knowledge as

Need help coding this.

Need help coding this. Project Description This first project is meant toensure that you are able to apply and extend your prerequisite knowledgeas well as introduce you to developing and testing a Java applicationin a Linux environment (i.e. the Odin development server). You should befamiliar with the majority of aspects of this project through your introductoryprogramming course and the class exercises from 1302. However, you may alsobe asked to do things that you have never been given explicitdirections for before. This is just a part of software development. Sometimesyou need to research how to solve a problem in order toimplement a solution. That being said, the material included in this documentshould hopefully answer the majority of your questions. Your goal is todevelop a non-recursive, non-GUI (GUI = Graphical User Interface) version of thegame called Minesweeper. The code for this game will be organized insuch a way that the recursive elements of Minesweeper can be addedat a later point in time, if desired. It will also beorganized so that you can add a GUI to it later aswell. Interestingly, the organization of some of the classes in this projectwill also introduce you to some elementary aspects of game programming. Ifyou are not familiar with Minesweeper as a game, then please consultthe Wikipedia entry for the game, ignoring any mentions of recursion. Onceyou're familiar with the basic gameplay, then continue reading this project description.Note Concerning "No Recursion" In a traditional game of Minesweeper, when theplayer "reveals" a square that does not contain a mine, two thingshappen: 1. A number representing the number of mines in the (up

Project Description This first project is meant to ensure that you are able to apply and extend your prerequisite knowledge as well as introduce you to developing and testing a Java application in a Linux environment (i.e. the Odin development server). You should be familiar with the majority of aspects of this project through your introductory programming course and the class exercises from 1302. However, you may also be asked to do things that you have never been given explicit directions for before. This is just a part of software development. Sometimes you need to research how to solve a problem in order to implement a solution. That being said, the material included in this document should hopefully answer the majority of your questions. Your goal is to develop a non-recursive, non-GUI (GUI = Graphical User Interface) version of the game called Minesweeper. The code for this game will be organized in such a way that the recursive elements of Minesweeper can be added at a later point in time, if desired. It will also be organized so that you can add a GUI to it later as well. Interestingly, the organization of some of the classes in this project will also introduce you to some elementary aspects of game programming. If you are not familiar with Minesweeper as a game, then please consult the Wikipedia entry for the game, ignoring any mentions of recursion. Once you're familiar with the basic gameplay, then continue reading this project description. Note Concerning "No Recursion" In a traditional game of Minesweeper, when the player "reveals" a square that does not contain a mine, two things happen: 1. A number representing the number of mines in the (up to) eight adjacent squares is placed in the revealed square; and 2. If the number of adjacent mines is zero, then game goes ahead and "reveals" all of the (up to) eight adjacent squares. The second part mentioned above can cause one reveal made by the user to result in multiple reveals in the minefield. This behavior is what the literature is referring to when it talks about recursion in Mineweeper. Your game should not support this behavior. If the user reveals one square, then, at most, one square is revealed in the minefield. Minesweeper Overview In your Minesweeper, the player is initially presented with a grid of undifferentiated squares. Either some randomly selected squares or seed- selected squares (more on seeds later) are designated to contain mines. The size of the grid and the number of mines are set in advance by a seed file that the user specifies as a command-line argument to your program. The ratio of the number of mines to the grid size is often used as a measure of an individual game's difficulty. The grid size can also be represented in terms of the number of rows and columns in the grid. In this project description, we may refer to the grid or to the minefield. Both of these terms mean the same thing. Furthermore, we will use the term square to denote a location in the minefield, even in situations where a location may be visually rectangular instead of perfectly square. The game is played in rounds. During each round, the player is presented with the grid, the number of rounds completed so far, as well as a prompt. The player has the option to do 6 different things, each of which is briefly listed below and explained in great detail in later sections: 1. Reveal a square on the grid. After the player correctly entered the command r 1 2, the state of the game updates (e.g., number of rounds completed, the grid, etc.), and the next round happens. Since there was no mine in square (1,2), the player does not lose the game. Also, since the total number of mines in the 8 cells directly adjacent to square (1,2) is 2, the number 2 is now placed in that cell. If the player reveals a square containing a mine, then the following message should be displayed and the program should exit gracefully (as defined near the end of this section): Oh no... You revealed a mine! TUITIVI I CIT CITT|||| \/ || LILLI LILILI U LII Yeah, that's old school ASCII art. Please note that the first and last lines are blank. Also note that the second line (containing "oh no...") begins with a single white space. A copy of this game over text, excluding the first and last blank lines, is contained in resources/gameover.txt. Graceful Exit: When we say that a program should exit gracefully, we mean that the exit status code used in the call to System.exit is a (i.e., zero). If a graceful exit is expected and your program exits for any reason with an exit status other than o (e.g., if your game crashes), then some points will be deducted from your grade. Immediately after any program terminates and returns to the terminal shell, a user can inspect what exit code was used by executing the following command: $ echo $? Note that using echo $? a second time would show the exit status of the first echo command; you would need to rerun your program and cause it to exit in order to check the exit status again. Mark Command In order to mark a square as definitely containing a mine, the mark or m command is used. The syntax format for this command is as follows: - ["mark"/"m" ] - [ (int)]-[(int)]- . The second and third tokens indicate the row and column indices, respectively, of the square to be revealed. 1. Reveal a square on the grid. 2. Mark a square as potentially containing a mine. 3. Mark a square as definitely containing a mine. 4. Lift the fog of war (cheat code). 5. Display help information. 6. Quit the game. When the player reveals a square of the grid, different things can happen: If the revealed square contains a mine, then the player loses the game. If the revealed square does not contain a mine, then a digit is instead displayed in the square, indicating how many adjacent squares contain mines. Typically, there are 8 squares adjacent to any given square, unless the square lies on an edge or corner of the grid. The player uses this information to deduce the contents of other squares, and may perform any of the first three options in the list presented above. When the player marks a square as potentially containing a mine, a ? is displayed in the square. This provides the user with a way to note those places that they believe may contain a mine but are not sure enough to mark as definitely containing a mine. When the player marks a square as definitely containing a mine, a flag, denoted by the character F, is displayed in the square. To simplify the game mechanics, the player may mark, guess, or reveal any square in the grid, even squares that have already been marked or revealed. In other words, the player may issue a command to mark, guess, or reveal a square, regardless of its current state. The logic for determining what happens to the square is always the same. For example, if a square has been revealed and the user marks it as definitely containing a mine then a round is consumed and the square should be marked. The user would then have to reveal this square again later. This may not be consistent with how you've played Minesweeper in the past but it will make it easier to code. We will leave it up to the user to be smart about how they play! The game is won only when both of the following conditions are met: All squares containing a mine are marked as definitely containing a mine; and All squares not containing a mine are revealed. At the end of the game, the player is presented with a score. Let rows , cols, and rounds denote the number of rows in the grid, columns in the grid, and number of rounds completed, respectively. A round is defined as one successful iteration of the main game loop. Therefore, only valid commands result in a round being consumed. To be clear, rounds is not quite the same as the number of commands entered (some may be invalid); however, it should be less than or equal to that number. The player's score is calculated as follows: The player's score is calculated as follows: score = 100.0 * rows * cols / rounds; A score of 100 would denote a perfect game. In this version of Mineweeper, it should not be possible for the player to win the game in less than (rows * cols) -many rounds (take a second to convince yourself of this fact). Therefore, any game in which the player exceeds that many rounds would result in a score that is less than 100 . When displaying the score, the number should always be printed with two digits following the decimal point. The Grid and Interface When the game begins, the following welcome banner should be displayed to the player once and only once: M (F) 1 VI-V-VIINI_V_I_V IMIT || AVV JIJI V VII LILIUM LILI LILI ALPHA EDITION |_| V2021.sp WEEDE Take care when printing this message out to the screen. Depending on how you implement this part, you may need to escape some of the characters in order for them to show up correctly. A copy of this welcome banner is contained in this README.md file and in resources/welcome.txt. In this Minesweeper game, the initial game configuration is loaded from a seed file; the player provides the path to a seed file when as a command line argument to the program. Two pieces of of information that are read from the seed file are the number of rows and the number of columns which together specify the grid size (i.e., the size of the minefield). The number of rows and the number of columns need not be the same. Rows and columns are indexed starting at @. Therefore, in a 10 -by- 10 (rows-by-columns), the first row is indexed as a and the last row is indexed as 9 (similarly for columns). In a 5-by- 8 game, the row indices are from o to 4, while the column indices are from a to 7, respectively. The Grid Let's assume we are playing a 5-by- 5 game of Minesweeper. When the game starts, the interface should look like this: Rounds Completed: 0 1 2 3 4 1 1 1 1 1 1 1 1 1 1 1 2 3 4 minesweeper-alpha: Let's assume we are playing a 10 -by- 10 game of Minesweeper. When the game starts, the interface should look like this: Rounds Completed: 0 | 1 1 1 1 1 1 1 1 | 1 21 3 4 5 6 7 | 8 9 1 1 1 1 1 1 1 1 | 1 1 2 3 4 5 6 7 8 9 minesweeper-alpha: Please note that the in either example, the first, third, and second-to-last lines are blank (the lines before and after "Rounds Completed" and the line before the prompt). All other lines, except the last line containing the prompt, start with one blank space. The line containing the prompt contains an extra space after the : so that when the user types in a command, the text does not touch the : . Multiple output examples are provided in the Appendix of this project description for your convenience. The User Interface The possible commands that can be entered into the game's prompt as well as their syntax are listed in the subsections below. Commands with leading or trailing whitespace are to be interpreted as if there were no leading or trailing whitespace. For example, the following two examples should be interpreted the same: minesweeper-alpha: help minesweeper-alpha: help Although it's hard to see in the example above, trailing whitespace should also be ignored. That is, if the user types one or more times before pressing the RET (return) key, then those extra whitespaces should be ignored. The different parts of a command are known as tokens. The help command, for example, only has one token. Other commands, such as the mark (seen below) have more than one token because other pieces of information are needed in order to interpret the command. As a quick example (which will be explored in more depth below), the player can mark the square at coordinate (0,0) using mark as follows: minesweeper-alpha: mark oo In the above example, you can see that the mark command has three tokens. A command with more than one token is still considered syntactically correct if there is more than one white space between tokens. For example, the following four examples should be interpreted the same: minesweeper-alpha: mark om minesweeper-alpha: mark minesweeper-alpha: mark @ @ minesweeper-alpha: mark 0 As a reminder, trailing whitespace is ignored. Advice on Reading Commands All valid game commands are entered on a single line. Implementers should always use the nextLine() method of their one and only standard input Scanner object to retrieve an entire line of input for a command as a string. Once an entire line is retrieved, it can be parsed using various methods; however, implementers may find it useful to construct a new Scanner object using the line as its source so that they can scan over the individual tokens. To put this into perspective, taking the "make a Scanner from the line" approach would make it so you can handle all four examples at the end of the last sub-section with one set of code. Here's some example code: // Assume you have have a Scanner object that reads from System.in called stdin String fullCommand = stdin.nextLine(); // reads the full command from the user (Ex: command may contain "reveal 1 3") // Create a new Scanner to parse the tokens from the given command Scanner commandScan = new Scanner (fullCommand); // Neat! A new use of Scanner. :) // Now, we can call our regular Scanner methods to get each part of the assigned command String command = commandScan.next(); // command would contain "reveal" from if given the command above. // Continue to call additional Scanner methods (nextInt(), etc.) to parse out the other tokens from the full command. Command Syntax Format In the sections below, we describe the syntax format that each command must adhere to in order to be considered correct. Unknown commands and commands that are known but syntactically incorrect are considered invalid. Information about displaying errors related to invalid commands is contained in a later section in this document. Please do not confuse this syntax with regular expressions, a topic that will not be covered in this course. You are NOT meant to put this weird looking syntax into any code. It is purely meant to convey to you, the reader, what is and what is not valid input for a given command. In a syntax format string, one or more non-new-line white space is represented as a - .Command tokens are enclosed in [] braces. If the contents of a token are surrounded by" marks, then that token can only take on that literal value. If more than one literal value is accepted for a token, then the quoted literals are separated by /. If the contents of a token are surrounded by () marks, then that token can only take on a value of the type expressed in parentheses. Note: the literal values are case-sensitive. So, "Reveal" is not the same as "reveal". Revealing a Square In order to reveal a square, the reveal or r command is used. The syntax format for this command is as follows: - ["reveal"/"r"]-[(int)]- [(int)]- . The second and third tokens indicate the row and column indices, respectively, of the square to be revealed. Let's go back to our 10 -by- 10 example. Suppose that we secretly know that there is a mine in squares (1,1) and (1,3). Now suppose that the player wants to reveal square (1, 2). Here is an example of what that might look like. Let's go back to our 10 -by- 10 example. Suppose that we secretly know that there is a mine in squares (1,1) and (1,3). Now suppose that the player wants to reveal square (1, 2). Here is an example of what that might look like. Rounds Completed: 1 | 1 | 1 1 | | 1 1 1 1 1 | 1 1 IT 1 | 21 31 4 5 6 7 8 | 9 1 1 TT 1 | 1 1 1 1 1 | 0 1 2 3 4 6 7 9 minesweeper-alpha: r 1 2 Rounds Completed: 1 | | | | 2 | 1 | 1 1 1 1 1 1 1 21 31 41 5 6 71 8 9 1 1 1 1 1 1 1 1 1 1 1 | 1 1 1 6 7 8 9 1 2 3 4 5 minesweeper-alpha: After the player correctly entered the command r 1 2, the state of the game updates (e.g., number of rounds completed, the grid, etc.), and the next round happens. Since there was no mine in square (1,2), the player does not lose the game. Also, since the total number of mines in the 8 cells directly adjacent to square (1,2) is 2, the number 2 is now placed in that cell. If the player reveals a square containing a mine, then the following message should be displayed and the program should exit gracefully (as defined near the end of this section): Oh no... You revealed a mine! III ICICLIT LILLI I IVI | UU LII Yeah, that's old school ASCII art. Please note that the first and last lines are blank. Also note that the second line (containing "oh no...") begins with a single white space. A copy of this game over text, excluding the first and last blank lines, is contained in resources/gameover.txt. Graceful Exit: When we say that a program should exit gracefully, we mean that the exit status code used in the call to System.exit is a (i.e., zero). If a graceful exit is expected and your program exits for any reason with an exit status other than o (e.g., if your game crashes), then some points will be deducted from your grade. Immediately after any program terminates and returns to the terminal shell, a user can inspect what exit code was used by executing the following command: $ echo $? Note that using echo $? a second time would show the exit status of the first echo command; you would need to rerun your program and cause it to exit in order to check the exit status again. Mark Command In order to mark a square as definitely containing a mine, the mark or m command is used. The syntax format for this command is as follows: - ["mark"/"m"]-[(int)]-[(int)]- . The second and third tokens indicate the row and column indices, respectively, of the square to be revealed. Let's go back to our 18 -by- 10 example. Suppose that the player wants to mark square (1, 2). Here is an example of what that might look like. Rounds Completed: 1 | 1 1 | 1 | 1 1 1 1 1 1 1 2 31 4 | 5 6 7 8 9 1 1 | 1 1 1 1 1 1 1 1 2 3 4 5 6 7 8 9 minesweeper-alpha: m 1 2 Rounds Completed: 1 1 1 | FI 1 | 1 1 1 1 1 1 11 2 31 4 5 | 6 | 7 | 81 9 1 1 1 1 1 1 1 1 1 1 1 2 3 4 5 6 7 8 9 minesweeper-alpha: After the player correctly entered the command m 1 2, the state of the game updates (e.g., number of rounds completed, the grid, etc.), and the next round happens. Guess Command In order to mark a square as potentially containing a mine, the guess or g command is used. The syntax format for this command is as follows: - ["guess"/"g"]-[(int)]-[(int)]- . The second and third tokens indicate the row and column indices, respectively, of the square to be revealed. Let's go back to our 10 -by- 10 example. Suppose that the player wants to guess square (1, 2). Here is an example of what that might look like. Rounds Completed: 0 1 1 1 1 1 1 1 1 1 1 1 2 3 4 5 61 7 81 9 1 1 1 1 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 minesweeper-alpha: g 12 Rounds Completed: 1 1 1 | 1 1 1 1 1 1 11 1 2 31 4 5 6 7 81 9 1 | 1 1 1 | 1 1 1 7 8 0 1 2 3 4 5 6 9 minesweeper-alpha: After the player correctly entered the command g 1 2, the state of the game updates (e.g., number of rounds completed, the grid, etc.), and the next round happens. No Fog Command This command removes, for the next round only, what is often referred to as the, "fog of war." All squares containing mines, whether unrevealed, marked, or guessed, will be displayed with less than and greater than symbols on either side of the square's center (as opposed to white space). Using the nofog command does use up a round. In order to issue this command, the nofog command is used. The syntax format for this command is as follows: - ["nofog"]- . Let's go back to our 10 -by- 10 example. Suppose that in this example, there are only two mines in the entire board which are located in squares (1,1) and (1,3). If the player marked square (1,1) during the first round and then used the nofog command during the second round, then here is an example of what that scenario might look like: Rounds Completed: 2 | 1 1 1 1 | | | 1 1 | 1 1 1 1 1 | 2 1 31 1 1 4 5 61 | IT 71 1 1 1 8 1 1 9 0 1 2 1 1 1 1 1 1 1 3 4 5 6 7 8 9 minesweeper-alpha: NOTE: This command should not be listed when the help command is used. Think of it as a cheat code! It should also be useful for debugging. Help Command In order to show the help menu, the help or h command is used. The syntax format for this command is as follows: -["help"/"h"]- . Let's go back to our 1e -by- 10 example. Suppose that the player wants to display the help menu. Here is an example of what that might look like. Rounds Completed: 1 1 | 1 2 1 31 1 4 1 1 | TL 1 1 | 1 1 | 1 1 1 1 | 1 | | 1 1 1 1 2 3 4 5 6 7 8 9 minesweeper-alpha: h Rounds Completed: 1 1 1 1 1 1 | 1 | 1 1 1 1 TI | 1 1 1 | 2 3 4 5 61 7 81 9 1 1 1 1 1 1 1 1 1 | 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 minesweeper-alpha: After the player correctly entered the command h, the state of the game updates (e.g., number of rounds completed, the grid, etc.), the help menu is displayed, and the next round happens. Note: the help command does use up a round. Quit Command In order to quit the game, the quit or q command is used. The syntax format for this command is as follows: -["quit"/"q"]- . Let's go back to our 10 -by- 10 example. Suppose that the player wants to quit the game. Here is an example of what that might look like. Rounds Completed: 0 1 1 1 1 1 1 1 1 | 1 1 1 1 1 IT 1 2 3 4 5 6 7 8 9 1 1 1 1 1 1 1 1 1 1 1 2 3 4 5 6 7 8 9 minesweeper-alpha: q Quitting the game... Bye! After the player correctly entered the command q, the game displayed the goodbye message and the program exited gracefully (as defined elsewhere in this document). Player Wins When the player wins the game, the following message should be displayed to the player and the game should exit gracefully (as defined elsewhere in this document): "So Doge" "Such Score" "Much Minesweeping" "Wow" . CONGRATULATIONS! YOU HAVE WON! SCORE: 82.30 Note that the first and last lines are blank and that the beginning of the other lines contain a single white space. You should replace the score in the output with the actual calculated score (mentioned above). A copy of this game won text, excluding the first and last blank lines as well as the score value, is contained in resources/gamewon.txt. The conditions for winning are outlined earlier in this document, here. Seed Files Each game is setup using seed files. Seed files have the following format: The first two tokens are two integers (separated by white-space) indicating the number of rows and cols, respectively, for the size of the mine board. The third token is an integer indicating nummines , i.e., the number of mines to be placed on the mine board. Subsequent pairs of tokens are integers (separated by white space) indicating the location of each mine. NOTE: In Java, the term white-space refers to one or more characters in a sequence that each satisfy the conditions outlined in Character.iswhitespace. You do not need to check these conditions specifically nor use this method if you use the built-in tokenizing provided by the Scanner class. NOTE: It is acceptable for white-space to occur both at the beginning and end of a seed file. The following seed files are valid and contain the same information: 10 10 2 0 0 1 1 10 10 1 1 10 10 2 0 1 1 An example seed file is present in the project materials. In order to run your program with the seed file, you should be able to use the following command (actual seed filename may differ): $ java -cp bin c51302.game. MinesweeperDriver tests/seed1.txt Note: The command you use to run your file from your main project directory (the directory containing src and bin) should exactly match the command above if you are passing in a seed file called seed1.txt containined in a tests directory located directly within your main project directory. To read the file, let us assume that we have access to the seed file's path via a string variable called seedPath and that we will use the following classes: File Scanner will use it to read from a text file. This is Most of you have used the Scanner class to read keyboard input from standard input. Here, accomplished using something similar to the following code snippet: try { File configFile = new File(seedPath); Scanner configScanner = new Scanner(configFile); // use Scanner here as usual } catch (FileNotFoundException e) { // handle the exception here // and perhaps do the following for testing/debugging only: // System.err.println(e); // e.printStackTrace(); // and don't forget to: // print any error messages described earlier and exit appropriately } // try You may need to import FileNotFoundException (or use its fully qualified name) if adapting the code snippet above. Displaying Errors All error messages should be printed to standard error ( System.err ) with one blank line preceeding the line with the error message. In some cases, an error message should cause the program to terminate. In such cases, an integer will be specificied that you are required to use the specific exit status number in your call to System.exit. If you let errorMessage denote an error message and exitstatus denote an exit status, then here is some code that exactly illustrates what needs to happen for error messages that exit the program: System.err.println(); System.err.println(errorMessage); System.exit(exitStatus); If an error does not exit the program, then the last line in the code above should be omitted. Here is a list of the different errors that can occur in the program: Invalid Usage Error: If your program encounters any number of command-line arguments other than one (i.e., if args.length != 1), then the error message and exit status in the table near the end of this section should be used. Seed File Not Found Error: If your program is not able to read the seed file that is specified by the user via a command-line argument due to a FileNotFoundException, then the error message and exit status in the table near the end of this section should be used. Note that (including the angle brackets) in the error message text should be replaced with the String returned by the exception object's getMessage() method. Seed File Malformed Error: If your program encounters a problem in the format of a seed file, then the error message and exit status in the table near the end of this section should be used. Note that a seed file is considered malformed or not formatted correctly if any of the following conditions are met: o a token is expected but is not found; o a token is not of the expected type (e.g., it's expected to be an int but it's not); o the token for rows is less than 5 or greater than 10 ; o the token for cols is less than 5 or greater than 10; o the token for numMines is less than 1 or greater than (rows * cols) - 1; or o the location of a mine is not in bounds. Note that (including the angle brackets) in the error message text should be replaced with some descriptive String. If the error arises due to some exception, then you may use the string returned by the exception object's getMessage() method; otherwise, you may use some short, single line String of your choosing that describes the problem. Invalid Command Error: While the game is running, if a command entered by the player is invalid or not recognized, then the error message in the table near the end of this section should be used. For this kind of error, the program should NOT exit, and a round should Invalid Command Error: While the game is running, if a command entered by the player is invalid or not recognized, then the error message in the table near the end of this section should be used. For this kind of error, the program should NOT exit, and a round should NOT be consumed (i.e., your counter for the number rounds should not increase). After the error message is displayed, the round is essentially restarted and the number of rounds, the grid, and the prompt should be displayed again. Note that (including the angle brackets) in the error message text should be replaced with some descriptive String . If the error arrises due to some exception, then you may use the string returned by the exception object's getMessage() method; otherwise, you may use some short, single line String of your choosing that describes the problem. Here is the table that summarizes the different error messages and exit status codes: Error Error Message Exit Status Invalid Usage Error Usage: MinesweeperDriver SEED_FILE_PATH 1 Seed File Not Found Error Seed File Not Found Error: 2 Seed File Malformed Error Seed File Malformed Error: 3 Invalid Command Error: Invalid Command: NA Minesweeper Oracle If at any time while you are writing your Minesweeper program you find yourself wondering "How should my program respond if happens", you can consult the provided Minesweeper oracle. The oracle is an executable-only (no code provided) version of the instructors' solution to the Minesweeper project and is available on Odin. To run the oracle, you need to provide the same command-line arguments that you would to your version of Minesweeper. You only need to change the start of the command. Here is the exact syntax: $ minesweeper-oracle c51302.game. MinesweeperDriver some/path/to/seed.txt

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!