Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part A: The World.h Header [15% test program] In Part A, you will define types and constants related to the world. Put them in a

image text in transcribed

Part A: The World.h Header [15% test program] In Part A, you will define types and constants related to the world. Put them in a file named World.h. Throughout this course, make sure that you use exactly the specified file names, which are case sensitive. Here, w is uppercase and the remaining letters are lowercase. Perform the following steps: 1. As the first line in World.h and every other header (.h) file for the rest of the course, put the following line: #pragma once This line tells the C++ compiler to only compile this file once even if it happens to be #included multiple times. 1A. Add a line that #includes the string library. Also put "using namespace std;". 2. In World.h, define ROW_COUNT and COLUMN_COUNT as int constants with the respective values 6 and 9. 3. Use a typedef command to define the NodeValue type to be the same as unsigned int. Hint: Do not put const in the typedef. 4. Define INACCESSIBLE, START_MESSAGE, END_MESSAGE, DEATH_NODE, START_NODE, and VICTORY_NODE as NodeValue constants with the respective values 0, 1, 2, 3, 4, and 5. 5. Use a typedef command to define the World type to be a 2D array of NodeValues with dimensions ROW COUNT by COLUMN_COUNT

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data And Databases

Authors: Jeff Mapua

1st Edition

1978502257, 978-1978502253

More Books

Students also viewed these Databases questions

Question

Provide examples of Dimensional Tables.

Answered: 1 week ago