Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I have seen this question answered before but cannot see the answer as it says there is an error. So could someone answer and explain
I have seen this question answered before but cannot see the answer as it says there is an error. So could someone answer and explain this to me, please. Thank you.
The array or characters is initialised by setting each cell to , while removing a subarray sets the corresponding cells to "'. File 'Sierpinski_Carpet.zip' contains a Sierpiski carpet for sizes 33,99,2727,8181 and 243243 (in case sizes 8181 and 243243 are unreadable in your text editor, then you will need to reduce the font). Implement class SierpinskiCarpet, which: Stores a 2D array of characters (i.e. char[]] board) as well as the dimension size of the array (i.e. 3,9,27,81 or 243 ) Initializes the board with characters ) Calls a recursive function that removes sub-arrays (by setting cells to ' ') resulting in a Sierpiski carpet (note that the recursive function must take the 2D array as input, but can take additional parameters that facilitate the recursion) Prints the Sierpinski carpetStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started