Question
CSCI/CMPE 2380 Assignment 3 (100 pts) ASCII art is a graphic design technique that uses computers for presentation and consists of pictures pieced together from
CSCI/CMPE 2380 Assignment 3 (100 pts) ASCII art is a graphic design technique that uses computers for presentation and consists of pictures pieced together from the 95 printable (from a total of 128) characters defined by the ASCII Standard. It can also be used to describe any textbased artwork. Your assignment is to create a program which can create instructions for making ascii art and can read instructions to output ascii art. An instruction file will look like: 1 12 sp, 15 X, 4 sp, 3 ,, 4 X 2 8 sp, 9 7, 8 R, 1 # The format is: Line# #OfSymbols Symbol A comma is used to separate the commands and sp is used to represent a space. An example of ASCII art: _==/ i i \==_ /XX/ |\___/| \XX\ /XXXX\ |XXXXX| /XXXX\ |XXXXXX\_ _XXXXXXX_ _/XXXXXX| XXXXXXXXXXXxxxxxxxXXXXXXXXXXXxxxxxxxXXXXXXXXXXX |XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX| XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX |XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX| XXXXXX/^^^^"\XXXXXXXXXXXXXXXXXXXXX/^^^^^\XXXXXX |XXX| \XXX/^^\XXXXX/^^\XXX/ |XXX| \XX\ \X/ \XXX/ \X/ /XX/ "\ " \X/ " /" Note that the art must be in a fixed width font. Create a program that prompts the user for a file and then outputs the instructions for creating ascii art, or given the instructions outputs a text file with the art. The output should look similar to the following: Please choose: (1) Create ascii art (2) Create instructions >1 File name: instructions.txt Output: instructions_art.txt Please choose: (1) Create ascii art (2) Create instructions >2 File name: art.txt Output: art_instr.txt If they enter art, append _instr to the filename for output, and _art for the other case. Your program should have the following files: main.cpp This has the main function which displays the menu, gets user input, then calls the appropriate function in AsciiArt.h. AsciiArt.h This contains the two methods to read and write art and instructions. Both require opening an input and output function simultaneously. Bonus (40): There are instances, such as plotting, where it is necessary to write all of one color, then all of the next color. Imagine you're creating instructions for a typing machine like this. Sort all of the characters to be printed by ascii value, then output the locations of that character to a file with the appended string _char_instr. Also add the appropriate menu item and output file notification. The format would be: Character RxC RxC where RxC is the row and column of the character. The RxC values do not have to be sorted. An example may look like: sp 12x7 12x8 12x9 X 2x3 8x4 m 12x10 12x11 8x5
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