subject

Code in C++
A two-dimensional Grid class
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. Include a no-argument constructor that initializes all the elements of the array to zero. 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. 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.
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: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 15:00
This is not a factor that you should use to determine the content of your presentation. your audience your goals your purpose your technology
Answers: 1
question
Computers and Technology, 23.06.2019 01:20
Me with this program in c++ ! computers represent color by combining sub-colors red, green, and blue (rgb). each sub-color's value can range from 0 to 255. thus (255, 0, 0) is bright red. (130, 0, 130) is a medium purple. (0, 0, 0) is black, (255, 255, 255) is white, and (40, 40, 40) is a dark gray. (130, 50, 130) is a faded purple, due to the (50, 50, 50) gray part. (in other word, equal amounts of red, green, blue yield gray).given values for red, green, and blue, remove the gray part. ex: if the input is 130 50 130, the output is: 80 0 80. thus, find the smallest value, and then subtract it from all three values, thus removing the gray.
Answers: 3
question
Computers and Technology, 24.06.2019 23:50
What is your fav video game currently: a) roblox b) fortnite c) apex legends d) pubg
Answers: 2
question
Computers and Technology, 25.06.2019 05:30
In 3-5 sentences describe how technology business professionals to be more efficient. include examples of hardware and software
Answers: 1
You know the right answer?
Code in C++
A two-dimensional Grid class
Define the class Grid, which is an abstraction...
Questions
question
History, 07.12.2019 08:31
question
Social Studies, 07.12.2019 08:31
Questions on the website: 13722361