Question: Problem 1: Configurable Shapes Write a program that draws shapes on the console. The program will execute in a while loop to display a menu

 Problem 1: Configurable Shapes Write a program that draws shapes onthe console. The program will execute in a while loop to displaya menu to the user. Users can select among 4 different shapes:

Problem 1: Configurable Shapes Write a program that draws shapes on the console. The program will execute in a while loop to display a menu to the user. Users can select among 4 different shapes: a filled rectangle, an empty rectangle, a filled triangle, and an empty triangle. In order to draw a rectangle on the console, the program must request the desired width and height of the rectangle. Once the user enters these parameters, the program will use a nested for loop to draw the rectangle. For triangles, the program will request the height of the triangle before drawing a triangle of given height. For both rectangle and triangle shapes, users can select to fill each shape with the character or draw them empty with the ''blank space. The sample output for the filled rectangle option is provided below. 1. Filled Rectangle 2. Empty Rectangle 3. Filled Triangle 4. Empty Triangle 5. Exit Enter option: 1 Enter height: 4 Enter width: 5 1. Filled Rectangle 2. Empty Rectangle 3. Filled Triangle 4. Empty Triangle 5. Exit Enter option: 5 Good bye! The sample output for the empty rectangle option is provided below. 1. Filled Rectangle 2. Empty Rectangle 3. Filled Triangle 4. Empty Triangle 5. Exit Enter option: 2 Enter height: 6 Enter width: 6 1. Filled Rectangle 2. Empty Rectangle 3. Filled Triangle 4. Empty Triangle 5. Exit Enter option: 5 Good bye! The sample output for the filled triangle option is provided below. 1. Filled Rectangle 2. Empty Rectangle 3. Filled Triangle 4. Empty Triangle 5. Exit Enter option: 3 Enter height: 3 * ***** 1. Filled Rectangle 2. Empty Rectangle 3. Filled Triangle 4. Empty Triangle 5. Exit Enter option: 5 Good bye! The sample output for the empty triangle option is provided below. 1. Filled Rectangle 2. Empty Rectangle 3. Filled Triangle 4. Empty Triangle 5. Exit Enter option: 4 Enter height: 5 1. Filled Rectangle 2. Empty Rectangle 3. Filled Triangle 4. Empty Triangle 5. Exit Enter option: 5 Good bye! After completion of this problem, you should be able to apply the following: Apply nested for loops to achieve program requirements This skills listed above are necessary to succeed in the next assignments and you will be required to prove mastery via quiz and exams. Getting Started 1. Download the starter file set. It will contain the following files: o main.cpp catch.hpp 2. Use your favorite IDE or editor to modify your files. Include the given files in a project or compile them using your compiler of choice. 3. If you try running the program it will tell you that it has failed all the tests. 4. Your goal is to make the program pass all the tests by completing the assignment. Your code should be placed in between the startRecording and stopRecording calls

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!