subject

P1 – a two-dimensional grid class (40 points) define the class grid, which is an abstraction of a game board, like a chess board. the grid class has one private data field which is a 10 by 10 two-dimensional array of integer data type [8pts]. include a no-argument constructor that initializes all the elements of the array to zero [4pts]. the grid class has a get function that returns the element at row i and column j of the array, the row and the column are passed as parameters to the get function [8pts]. the class must also have a set function that sets the element at row i and column j of the array to a given value. the row and the column as well as the new value are passes as parameters to the set function [8ts]. write a main function in which an object of the type grid is created, then print the value of the element in location (3, 5), next set the value of the element in location (3, 5) to 100 and print the new value

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 07:30
Events and conditions that happen within an organization that are somewhat easier to deal with when responding to change are called
Answers: 1
question
Computers and Technology, 22.06.2019 14:30
Hi plz 11 ! when planning a table, what step comes first: "define the column headers" or "calculate the number of columns/rows"? a. calculate the number of columns/rows b. define the column headers
Answers: 1
question
Computers and Technology, 22.06.2019 21:00
Simon says is a memory game where "simon" outputs a sequence of 10 characters (r, g, b, y) and the user must repeat the sequence. create a for loop that compares the two strings starting from index 0. for each match, add one point to userscore. upon a mismatch, exit the loop using a break statement. assume simonpattern and userpattern are always the same length. ex: the following patterns yield a userscore of 4: simonpattern: rrgbryybgy userpattern: rrgbbrybgy
Answers: 2
question
Computers and Technology, 22.06.2019 23:30
For her science class, elaine is creating a presentation on weather in the united states. she wants to make the presentation beautiful and interesting by drawing simple cloud or wave shapes. which is the best way for elaine to draw these shapes?
Answers: 1
You know the right answer?
P1 – a two-dimensional grid class (40 points) define the class grid, which is an abstraction of a ga...
Questions
question
Mathematics, 16.10.2019 20:00
question
Mathematics, 16.10.2019 20:00
Questions on the website: 13722361