Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

can you please explain the concept and the code in detail. it's done in Java language. 177% 12:59 o0 Tasks 1. Write a program called

image text in transcribed

can you please explain the concept and the code in detail. it's done in Java language.

177% 12:59 o0 Tasks 1. Write a program called CA.java that simulates an Elemenlary Cellular Aulomalon The user must be able to provide these two things: as arguments when executing the program from Console: 1. the number of iterations (any integer n) 2. the Rule Number (an integer from 0 to 255) The program will inilialize the grid lo a width ol n x 2, wilh a single cell sel lo Irue/alive in the centre. Il will then display the ileralions of the aulomalon in consale, Example run command in Console: java CA 20 223 will create an automaton with grid width (20 x 2 =) 40, and will run for 20 ileralions using Rule 223. How to handle the update of the leftmost and rightmost cells: the easiest way is to ignore them and only update the cells from [1] to (last'-1]. Or, if you prefer, you can pretend that there are cells at [-1] and [last+1] that have state = 0. It's up to you. The Rule90 example code does it the first way. This video shows an example of whal's required: 177% 12:59 o0 Tasks 1. Write a program called CA.java that simulates an Elemenlary Cellular Aulomalon The user must be able to provide these two things: as arguments when executing the program from Console: 1. the number of iterations (any integer n) 2. the Rule Number (an integer from 0 to 255) The program will inilialize the grid lo a width ol n x 2, wilh a single cell sel lo Irue/alive in the centre. Il will then display the ileralions of the aulomalon in consale, Example run command in Console: java CA 20 223 will create an automaton with grid width (20 x 2 =) 40, and will run for 20 ileralions using Rule 223. How to handle the update of the leftmost and rightmost cells: the easiest way is to ignore them and only update the cells from [1] to (last'-1]. Or, if you prefer, you can pretend that there are cells at [-1] and [last+1] that have state = 0. It's up to you. The Rule90 example code does it the first way. This video shows an example of whal's required

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

Databases DeMYSTiFieD

Authors: Andy Oppel

2nd Edition

0071747990, 978-0071747998

More Books

Students also viewed these Databases questions

Question

Do you suggest Lisa use a PEO? Why?

Answered: 1 week ago