Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Programming project, please make sure to follow all instructions and make it simple 1. Problem Statement: The goal of this programming assignment is to use
Programming project, please make sure to follow all instructions and make it simple
1. Problem Statement: The goal of this programming assignment is to use iteration (for loops or while loops) and condition statements (if statements or switch statements) to create a variety of patterns using ASCII characters. Your task is to prompt the user for a size, and then output the following five patterns: Solid Square Pattern Square Outline Pattern Solid Triangle Pattern Letter X Pattern The examples above all have size =5. Your program should work for any size in the range [5..20], and do error checking to be sure the size is in this range. Since the size of the pattern is an input parameter, it would be a very BAD idea to "hard code" the output of patterns using cout statements. Instead, you need to use iteration and conditions to create the output patterns. 2. Design: Try to design the code to be as simple as possible. Start by making a square of solid *'s for a given width. This can be done by looping over the square and printing an asterisk. You may also want to print a space character so that the width and height of the square look the same. Looping over the square can be achieved using nested loops. Finally, add if statements to the code so that it prints an asterisk only when it is part of a pattern you would like to print. 3. Implementation: You can implement this program using either a bottom-up approach or a top-down approach. If you go for a bottom-up approach, start by creating basic methods and classes, and test these methods using a simple main program that calls each method. When this is working, you can create the main program that uses these methods to solve the problem above. If you go for a top-down approach, start by creating your main program that reads user input, and calls empty methods to pretend to solve the problem. Then add in the code for these methods one at a time. This way, you will get an idea of how the whole program will work before you dive into the details of implementing each method and class. Regardless of which technique you choose to use, you should develop your code incrementally adding code, compiling, debugging, a little bit at a time. This way, you always have a program that "does something" even if it is not complete 4. Testing: Test your program to check that it operates correctly for all of the requirements listed above. Also check for the error handling capabilities of the code. Try your program on 23 input values and save your testing output in text files for inclusion in your project reportStep 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