Question: Program needs to be written in C. Please type up answer to avoid in correct picture order or sloppy hand writing. Use Letter: V I
Program needs to be written in C. Please type up answer to avoid in correct picture order or sloppy hand writing. Use Letter: V I L A R E C K Y
Introduction
The purpose of this assignment is to learn how to control the location of outputs written to the terminal window.
Main description
Make a function that will output a letter of the English alphabet in size 12 char by 16 char. For instance, if the letter is H then the corresponding function will output the following 12x16 pattern.
H H
H H H H H H H H H H H H HHHHHHHHHHHH H H H H H H H H H H H H H H H H
Notice that the H is written in a 12x16 grid where each element of the grid is one ascii character. The upper left corner of this grid has a coordinate pair (x,y) to identify its location. Lets suppose the name of the function is: show_H. Then its prototype will be
void show_H(int x, int y); or void show_H(int, int);
The x and y values received by the function tell the function where to draw the 12x16 character.
Use letters from your own name
Starting with your own family name (last name) pick 8 distinct characters for which you will make functions For example, the professors last name is Holliday. That means I will make functions as follows:
Display_V
Display_I
Display_L
Display_A
Display_R
Display_E
Display_C
But that is only 7 characters. Therefore, the professor has to go to his first name and select one more character to make the function below.
Display_K
You have to find 8 different characters in your name so that you can have 8 different functions.
Make a complete program
You need a main program that will call your letter functions. You create a main program that behaves according to the sample run below.
Sample run
Welcome to Ascii Letters.
These are the available letters: V I L A R E C K Y
Enter a letter to display (cntl+D to quit): d
Enter the coordinates: 5 2
Enter a letter to display (cntl+D to quit); y
Enter the coordinates: 28 6
Enter a letter to display (cntl+D to quit): ^D
Thank you for your inputs. Your letters are here:
d
d
d
d y y
d y y
d y y
d y y
d y y
dddd y y
dddd d y y
ddd d yy
dd d yy
dd d yy
ddd d yy
dddd d yy
dddddd yy
yy
yy
Thank you for using this ascii art program.
Please come back again.
Notice that the y character is slightly lower than the d character. This is because the user entered a vertical coordinate for y that is bigger than the vertical coordinate of d.
Program architecture
There will be one main file and 8 characters files. Each character file contains one function, and that function will display exactly one character.
Test data
Again in this assignment you do not have to check for bad inputs. We are assuming the user only enters valid data. We assume that the characters entered by the user are from the displayed list. We also assume that the coordinate values are in the valid range. For example, a negative coordinate number is invalid in this assignment.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
