Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java -URGENT please help Note that the examples are only for demonstratration Continued with https://www.chegg.com/homework-help/questions-and-answers/question-2-game-life-50-points-question-write-java-program-implements-simple-version-conwa-q29764348 2d) Method to create the next generation universe Write a

Java -URGENT please help

Note that the examples are only for demonstratration

Continued with https://www.chegg.com/homework-help/questions-and-answers/question-2-game-life-50-points-question-write-java-program-implements-simple-version-conwa-q29764348

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

2d) Method to create the next generation universe Write a method getNextGenUniverse that takes as iput a two-dimensional array of integers represent- ing a valid universe and returns a two-dimensional array of integers (with equal dimensions) representing the universe in its next generation. To get full marks, your method must call getNextGenCell) For example, consider the following arrays: int [] C) tub-tO,0,0,0,0, to,0,1,0,0), 10,1,0,1,0, t0,0,1,0,0, t0,0,0,0,0); int[ C toad t0,0,0,0,0,0, 0,0,1,1,1,0, (0,1,1,1,0,0, t0,0,0,0,0,0); int C pentadec-o,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0, 10,0,0,0,1,0,0,0,0, t0,0,0,0,1,0,0,0,o), t0,0,0,1,0,1,0,0,0, t0,0,0,0,1,0,0,0,0, (0,0,0,0,1,0,0,0,0, 0,0,0,0,1,0,0,0,0, 10,0,0,0,1,0,0,0,0, 10,0,0,1,0,1,0,0,0) (0,0,0,0,1,0,0,0,0, t0,0,0,0,1,0,0,0,0, t0,0,0,0,0,0,0,0,0, to,0,0,0,0,0,0,0,0), (0,0,0,0,0,0,0,0,0; Then: getNextGenUniverse (tub) returns the following array: C0,0,0,0,03, 10,0,1,0,0, 0,1,0,1,o, t0,0,1,0,0, to,0,0,0,0H getNextGenUniverse(toad) returns the following array: t0,0,0,1,0,03, 10,,0,0,1,o, t0,1,0,0,1,0), to,0,1,0,0,0) getNextGenUniverse (pentadec) returns the following array: (t0,0,0,,0,0,0,0,0, t0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0, tO,0,0,0,0,0,0,0,0, t0,0,0,1,,0,0,0, t0,0,0,1,0,1,0,0,0, 0,0,0,1,,,0,0,0, t0,0,0,,,,0,0,0, t0,0,0,0,0,0,0,0,03, 10,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0, t0,0,0,0,0,0,0,0,0

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_2

Step: 3

blur-text-image_3

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

Modern Database Management

Authors: Fred R. McFadden, Jeffrey Slater, Mary B. Prescott

5th Edition

0805360549, 978-0805360547

More Books

Students also viewed these Databases questions

Question

How to solve maths problems with examples

Answered: 1 week ago