Käynnissä

Write Program C++ Using Pointers

Objective:

Learn how to use pointers

Specifications:

For this assignment you will be implementing the classic cellular automata of Conway's Game of Life.

Rules:

1. A new cell is born on an empty square if is surrounded by exactly three neighboring cells

2. A cell dies of overcrowding if it has four or more neighbors

3. A cell dies of loneliness if it has zero or one neighbor

4. Any live cell with two or three live neighbors lives, unchanged, to the next generation.

Implementation details:

The initial state of the game is held in a text file named the driver code and attached to this assignment (you must use this driver program). The format will be sequences of ones and zeros. A one means that a cell is living in that square. You will determine the size of the grid display by reading the first line of the text file and seeing how many columns you will need. You will determine the number of rows in the grid by counting the lines of data.

Exampled:

00000000100000001010

00000000010000001001

11100000010100000010

10100100101010101010

00101010010010101000

The grader will use a file with arbitrary grade size to grade the project. You algorithm should be able to handle this.

Example: Jeremy Allen's Glider Gun fight grid (set the iterations to 500).

Note: When printing out the status of the grid, print one character to standard output per cell in the automaton. You may use whatever characters you wish to show the status of the cell. The driver program will clear the screen between generations.

In this project you will have three files -

1) "life.h" will store the prototypes of all functions that are employed in the workings of Game of Life

2) "life.cpp" will store all headers and definitions of the functions identified in "life.h"

3) "life_driver.cpp" - this is a given file that tests the functionality of your game of life.

To compile all three files you need to add them to a project in

Dev C++ environment.

( THE FILES ARE BELOW AT THE END OF THIS ASSIGNMENT.)

Note: when you submit your life.h and [url removed, login to view] they should work with default [url removed, login to view] file.

It means that you cannot make any changes to [url removed, login to view] except the value for

NUM_GENERATIONS for debugging purposes.

NOTES: DO NOT USE "CLASS" THAT IS USED IN DATA STRUCTURE. AND PLEASE DO NOT USE STRING. USE CHARACTERS INSTEAD OF STRINGS.

Make sure:

1) Code compiles

2) Following functionality is tested

a. ShowWorld() function works correctly

b. iterateGeneration() function works correctly, i.e., correct cells become alive and

correct cells die

c. the program can handle input of an arbitrary size by using two dimensional

dynamic arrays

3) Comments are present in the code

4) Code styling margins (lines of the code are not too long), readability (code is not

cluttered and follows style standards for the class )

5) Code efficiency: code is concise and no unnecessary conditional, interactive and

sequential statements are employed considering the implementation requirements and

constraints outlined by the project

Penalty: (SO THINGS TO AVOID)

1) Non-default [url removed, login to view] has to be employed for the program to work

2) Dynamic arrays should go and shrink with each generation as new live cells appear and

disappear. Only single boundary of dead cells around the live cells is allowed when the

new generation is displayed or written to a temporary file. If this functionality is not

implemented

3) If string objects are used

Taidot: C++ -ohjelmointi

Näytä lisää: use of pointers in data structure, use of data structure in programming, use of algorithm in programming, string standard functions in c, strings in c programming, strings for c standard, string in data structure, string in cpp, string functions in cpp, string data structure, string cpp, string cplusplus, string algorithm, set in data structure, set data structure, sequential programming, requirements to learn programming, programming with cpp, programming pointers, programming of life, programming in objective c, programming in data structure, programming definitions, programming data structure, programming algorithm example

Tietoa työnantajasta:
( 0 arvostelua ) Austin, United States

Projektin tunnus: #4289794

Myönnetty käyttäjälle:

rmrf

Hi, please check your inbox. Thanks.

69 $ USD 1 päivässä
(16 arvostelua)
3.6

7 freelancers are bidding on average $99 for this job

dobreiiita

Hi, I am C++ expert and can surely help you here, Thank You

150 $ USD 2 päivässä
(91 arvostelua)
5.7
msabouri

I can help you.

119 $ USD 3 päivässä
(21 arvostelua)
4.3
tlonchakov

Let me try to do this task. I'm new on this site, could we discuss the details?

80 $ USD 7 päivässä
(0 arvostelua)
0.0
cliffroot

Hello. I am ready to do this project for you as soon as possible. The task is very interesting to implement. Thanks,

45 $ USD 2 päivässä
(0 arvostelua)
0.0
nothlione

This is a classic academic task, I can do that for you within the rules established. Thanks.

30 $ USD 1 päivässä
(0 arvostelua)
0.0
tutorapex

will code in best way with full comments .hire me

200 $ USD 1 päivässä
(0 arvostelua)
0.0