Answered step by step
Verified Expert Solution
Question
1 Approved Answer
CSE 1 3 2 2 L Lab 1 Background: In this lab, you are going to draw some Ascii Art using a two dimensional array.
CSEL Lab
Background:
In this lab, you are going to draw some Ascii Art using a two dimensional array. When dealing with
multidimensional arrays, youll typically use nested loops ie a loop within a loop The outer loop
typically iterates over the rows of the array, while the inner loop typically iterates over the columns.
A two dimensional array uses two indexes. The first index represents the row number, while the
second index represents the column. For example: myArray refers to the first row and the
second column
Your Tasks:
Open your IDE and start a new project.
Copy and paste the appropriate version of the makeforward method from page below. This
method creates and returns a two dimensional array of characters with some Ascii Art in it
In your main method, create a two dimensional array of characters with rows and columns.
Call the makeforward method and store the result in your new array.
Using loops, print out the array contents character by character. You should see Ascii Art.
Write a new method called makemirror It should take a two dimensional array as a
parameter and return a mirrored version of that D array. ie The contents of each row should
be reversed as follows:
a Input array cell should be copied to cell in the return array, likewise cell
should be copied to cell cell should be copied to cell
b Cell will be copied to cell cell should be copied to cell etc...
c The same is true for the other two rows.
d As you copy each character, check the table below to see if the character itself needs to
be reversed. If the character is not in the table, copy it as normal, but if it is in the table,
replace it with the Mirrored character. You will need if statements for this.
Step 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