Expressions Assignment

Expressions Assignment - 3. For each submenu option, prompt...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Assignment:  Program 4: Expressions   Assignment Information Maximum grade: 100   Due date: March 24, 2008 Instructions: This program gives your an opportunity to express your creativity using functions and those text art  skills you developed.  1. Create a  prog4  directory.  2. Create a C++ program called  expressions.cpp  that has a main menu with 3 options: (1) Draw  a shape, (2) Draw a facial expression, and (3) Exit and two submenus, where submenu #1  has at least 4 options: (1) Draw a line, (2) Draw a square, (3) Draw a diamond, and (4) Return  to Main Menu, and submenu #2 has at least 4 options: (1) Draw a blank look (outline a head  with no facial features), (2) Draw a happy face, (3) Draw a sad face, (4) Return to Main Menu.  Validate the option chosen. Use the switch statement where appropriate instead of the if-else  structure. Offer additional shapes and facial expressions for extra credit!
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 3. For each submenu option, prompt the user for the width , validate the width to be between 8 and 40, then call a user defined functions that produce the chosen graphic object based on the width supplied by the user. Use the nested for loop statement(s) where appropriate instead of the while statement. 4. The user should be repeatedly allowed to draw differents shapes and faces until they choose to quit. 5. Develop a set of test cases and record what happens using the script command, saving the result in expressions.txt. 6. Upload and submit both the expressions.cpp file and the expressions.txt file to WebCT. Assignment files: None Submissions: You can only submit your assignment once. No re-submission is permitted. Notification: The instructor will not be notified via email when you submit this assignment....
View Full Document

Ask a homework question - tutors are online