Living cell dies of overcrowding in the next generation

Assignment Help Basic Computer Science
Reference no: EM131240039

DO IN C++

Write a program to implement the simulation of life as described in Scientific American by Martin Gardner. The program will be implemented on a two dimensional surface of size 60 by 60 visible elements. The rules of the simulation are as follows:

1) An initial set of cells are marked as "alive" by the user. This is generation 0. Yourprogram will ask the user to input a set of row and column values to let the user determine which cells are "alive". Display this generation.

2) Cells change for each succeeding generation by the following rules:

a. A living cell dies of overcrowding in the next generation if it currently has 4 or more living neighbors.

b. A living cell dies of loneliness in the next generation if it currently has only 0 or 1 living neighbors.

c. An empty cell becomes a "birth" cell (becomes alive) in the next generation if it has exactly 3 living neighbors.

d. All other cells remain unchanged.

3) The new generation becomes the current generation and is displayed.

4) After displaying each new generation, ask the user if they wish to continue to the next generation or stop at this point.

Reference no: EM131240039

Questions Cloud

How ips anomaly detection differ from misuse detection : How does IPS anomaly detection differ from misuse detection? - What is computer forensics? - What is a honey pot? - What is desktop management?
Explain key developments in the global environment : What will be the key developments in the global environment of business during the next five years? On the basis of these, what will be the greatest challenges that firms from the advanced industrialized countries will face?
What might be the consequences of not involving nurses : Reflect on your own experiences with your organization selecting and implementing new technology. As an end user, do you feel you had any input in the selection or and planning of the new HIT system?
Write the contrapositive of the statement : Using truth tables, verify that the statement if I am at the combination Pizza Hut and Taco Bell, then I am at the Pizza Hut is always true.
Living cell dies of overcrowding in the next generation : a. A living cell dies of overcrowding in the next generation if it currently has 4 or more living neighbors. b. A living cell dies of loneliness in the next generation if it currently has only 0 or 1 living neighbors.
Reduce the temptation to become a hacker : Most hackers start their careers breaking into computer systems as teenagers. - What can we as a community of computer professionals do to reduce the temptation to become a hacker?
Implement methods for establishing a constructive structure : develop and implement methods for establishing a constructive organizational structure and culture that fosters positive employee and employer relationships
Rewrite every cat drinks beer as an implication : Using truth tables, verify that the converse of a statement is not logically equivalent to the original statement. (Suggestion: make the columns P, Q, P ⇒ Q, and Q ⇒ P, and compare the last two columns.)
Do you think cert should continue to post security holes : Some experts argue that CERT's posting of security holes on its Web site causes more security break-ins than it prevents and should be stopped. - What are the pros and cons on both sides of this argument?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Foreign key constraints can only reference the primary key

Explain how to enforce total participation constraints using complex check constraints or assertions (see Section 4.4.7). (Unfortunately, these features are not supported on any widely used database currently.)

  What values should the computer provide as output

Draw a program flowchart for a program that will accept one number as input. Assume this number represents some amount of yards.

  Briefly describe the data collection techniques

Briefly describe the data collection techniques. Did the researcher use appropriate data collection techniques (qualitative and/or quantitative) to answer the study's research questions

  Explain what his type of error message

Regards to a computer error. In Linux Lubuntu 15.04, there is a common error message that appears as "Reboot: System Halted" wondering if anyone can explain what his type of error message is and what it means.

  Write specific formulas and functions

Consider the following scenario: As supervisor for a retail company, you supervise six people in your location. You are responsible for their payroll and commissions each week. Use the data provided to create a worksheet described below

  Analyze during the planning phase of negotiation

Discuss what a salesperson should review and analyze during the planning phase of negotiation? How does a typical salesperson obtain the knowledge needed to become a successful salesperson?

  C program to find three numbers that have this special

Add the first two digits to the last two digits. Now, square the sum. Surprise, you've got the original number again. Of course, not all four-digit numbers have this property. Write a C program to find three numbers that have this special property..

  Amendment protection against unreasonable search

The 4th Amendment protection against unreasonable search and seizure has been jealously guarded for over 200 years. Consequently, all Americans are entitled to a reasonable expectation of privacy. How would you describe this standard, this so-call..

  Prove that machine precision as bound for relative round off

Prove that machine precision (epsilon) calculated by mathlab's eps function can be utilized as a bound for relative round off.

  Calculate the apr which mr brown paid

Calculate the APR which Mr Brown paid for the 30 day loan. Comment on whether this loan legally or morally constitutes usury?

  Difference between in-place updating and shadowing

What is the difference between in-place updating and shadowing, with respect to their handling of BFIM and AFIM?

  Use openoffice software to build tables

PART 1 You are required to use OpenOffice software to build tables, write, and execute queries.Step 1Build a Database named DBMS Course Project. The database should include following tables.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd