Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Extend your lab to draw a picture of your choice to the canvas using ascii characters. To complete this task create a function called DrawPicture

Extend your lab to draw a picture of your choice to the canvas using ascii characters. To complete this task create a function called DrawPicture to draw a picture of your choice to the canvas. It should be called in between your calls to ClearCanvas and FrameCanvas. The picture must fit in the canvas frame and can be of anything you want. For my example, I made a stick figure selfie. You may use this same picture. Requirements 1. All requirements from the lab apply to the homework. 2. Your picture should resemble something or be a pattern. A couple of random characters dont count. Google search for ascii art for ideas. It is also permissible to use my example. 3. The picture should be within the boundaries of your frame. 4. Use good code style guidelines

Expected Output

********************

* *

* *

* *

* O *

* -|- *

* / \ *

* *

* *

********************

here is the code that doesnt have the picture

#include

void clearCanvas(char canvas[10][20]) { for(int i=0;i<10;i++) for(int j=0;j<20;j++) canvas[i][j] =' '; } void FrameCanvas(char canvas[10][20]) { for(int i=0;i<10;i++) for(int j=0;j<20;j++) { if(i==0 || i==9) canvas[i][j] ='*'; else if(j==0 || j==19) canvas[i][j] ='*'; } }

void DisplayCanvas(char canvas [10][20]) { for(int i=0;i<10;i++) { for(int j=0;j<20;j++) { cout << canvas[i][j]; } cout <

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

Step: 3

blur-text-image

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

More Books

Students also viewed these Databases questions

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago