Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need help with this whole milestone, you can skip step 1. This application should be a Console App(.Net Framework) in C# Milestone 1: Console
I need help with this whole milestone, you can skip step 1. This application should be a Console App(.Net Framework) in C#
Milestone 1: Console Application Overview In this milestone, students will create three classes: Cell, Board, and Program Execution Execute this assignment according to the following guidelines: Draw a UML class diagram for the following requirements. You can use any drawing software such as Visio or Draw.io to create the diagrams. Save the resulting picture in a Word document. If you need a review of UML diagrams you can review video "UML Class Diagram Tutorial," from YouTube https://www.youtube.com/watch?v=U16GHOVHic 2. Create a class that models a game Cell. A game cell should have the following properties: a. Its row and column. These should initially be set to -1. b. Its visited Boolean value. This should initially be set to false. c. Live Boolean value. This should initially be set to false, "Live" set to true will indicate that the cell is a "live bomb" cell. d. The number of neighbors that are "live." This should initially be set to 0. The Cell class should have a constructor as well as getters and setters for all properties. 3. Create a class that models a game Board. A game board should have the following properties: a. Size. The board will be square, where the size includes the dimensions of both the length and width of the board. b. Grid. The grid will be a 2-dimensional array of the type cell. c. Difficulty. A percentage of cells that will be set to "live" status. 4. The Board class should have the following methods: a. The constructor for the Board should have a single parameter to set the size of the Grid. In its constructor, the Grid should be initialized so that a Cell object is stored at each location. setup LiveNeighbors. A method to randomly initialize the grid with live bombs. The method should utilize the Difficulty property to determine what percentage of the cells in the grid will be set to "live" status. c. calculateLiveNeighbors. A method to calculate the live neighbors for every cell on the grid. A cell should have between 0 and 8 live neighbors. If a cell itself is "live", then you can set the neighbor count to 9. 5. Program a. The Program class should be the console app that drives the application. This is the class that should contain a main() method. The main program should have a printBoard helper method that uses, for loops, the Console.Write and Console.WriteLine commands to display the contents of the Board as shown at the beginning of these instructions. 6. The main method should a. Create an instance of the Board class b. Call the Board.setup LiveNeighbors and Board.calculateLiveNeighbors commands to initialize the grid. c. Call the printBoard method to display the contents of the grid. Milestone 1: Console Application Overview In this milestone, students will create three classes: Cell, Board, and Program Execution Execute this assignment according to the following guidelines: Draw a UML class diagram for the following requirements. You can use any drawing software such as Visio or Draw.io to create the diagrams. Save the resulting picture in a Word document. If you need a review of UML diagrams you can review video "UML Class Diagram Tutorial," from YouTube https://www.youtube.com/watch?v=U16GHOVHic 2. Create a class that models a game Cell. A game cell should have the following properties: a. Its row and column. These should initially be set to -1. b. Its visited Boolean value. This should initially be set to false. c. Live Boolean value. This should initially be set to false, "Live" set to true will indicate that the cell is a "live bomb" cell. d. The number of neighbors that are "live." This should initially be set to 0. The Cell class should have a constructor as well as getters and setters for all properties. 3. Create a class that models a game Board. A game board should have the following properties: a. Size. The board will be square, where the size includes the dimensions of both the length and width of the board. b. Grid. The grid will be a 2-dimensional array of the type cell. c. Difficulty. A percentage of cells that will be set to "live" status. 4. The Board class should have the following methods: a. The constructor for the Board should have a single parameter to set the size of the Grid. In its constructor, the Grid should be initialized so that a Cell object is stored at each location. setup LiveNeighbors. A method to randomly initialize the grid with live bombs. The method should utilize the Difficulty property to determine what percentage of the cells in the grid will be set to "live" status. c. calculateLiveNeighbors. A method to calculate the live neighbors for every cell on the grid. A cell should have between 0 and 8 live neighbors. If a cell itself is "live", then you can set the neighbor count to 9. 5. Program a. The Program class should be the console app that drives the application. This is the class that should contain a main() method. The main program should have a printBoard helper method that uses, for loops, the Console.Write and Console.WriteLine commands to display the contents of the Board as shown at the beginning of these instructions. 6. The main method should a. Create an instance of the Board class b. Call the Board.setup LiveNeighbors and Board.calculateLiveNeighbors commands to initialize the grid. c. Call the printBoard method to display the contents of the gridStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started