{"id":108058,"date":"2022-12-03T12:49:24","date_gmt":"2022-12-03T12:49:24","guid":{"rendered":"https:\/\/assignmenttutors.net\/blog\/the-purpose-of-this-project-is-to-provide\/"},"modified":"2022-12-03T12:49:24","modified_gmt":"2022-12-03T12:49:24","slug":"the-purpose-of-this-project-is-to-provide","status":"publish","type":"post","link":"https:\/\/assignmenttutors.net\/blog\/the-purpose-of-this-project-is-to-provide\/","title":{"rendered":"The purpose of this project is to provide"},"content":{"rendered":"<div>\n<p>The purpose of this project is to provide you with practice using conditional statements, loops, and functions. Your task is to write a program that allows a user to display a simple graphic shape using text symbols. Five basic shapes are allowed: V-shape, Hat-shape, X-shape, Right-Arrow-shape, and the Left-Arrow-shape. The shapes are defined as follows:<\/p>\n<p>Type Parameters Limitations Sample Input Sample<\/p>\n<p>Output<\/p>\n<p>V-shape Number of rows<\/p>\n<p>(n)<\/p>\n<p>0 &lt; n &lt; 30 V 4 * *<\/p>\n<p>* *<\/p>\n<p>* *<\/p>\n<p>*<\/p>\n<p>Hat-shape Number of rows<\/p>\n<p>(n)<\/p>\n<p>0 &lt; n &lt; 30 H 4 *<\/p>\n<p>* *<\/p>\n<p>* *<\/p>\n<p>* *<\/p>\n<p>X-shape Number of rows<\/p>\n<p>(n)<\/p>\n<p>0 &lt; n &lt; 30<\/p>\n<p>and<\/p>\n<p>n is odd<\/p>\n<p>X 5 * *<\/p>\n<p>* *<\/p>\n<p>*<\/p>\n<p>* *<\/p>\n<p>* *<\/p>\n<p>Rightarrowshape<\/p>\n<p>Number of rows<\/p>\n<p>(n)<\/p>\n<p>0 &lt; n &lt; 30<\/p>\n<p>and<\/p>\n<p>n is odd<\/p>\n<p>R 5 *<\/p>\n<p>**<\/p>\n<p>***<\/p>\n<p>**<\/p>\n<p>*<\/p>\n<p>Left-arrowshape<\/p>\n<p>Number of rows<\/p>\n<p>(n)<\/p>\n<p>0 &lt; n &lt; 30<\/p>\n<p>and<\/p>\n<p>n is odd<\/p>\n<p>L 5 *<\/p>\n<p>**<\/p>\n<p>***<\/p>\n<p>**<\/p>\n<p>*<\/p>\n<p>Your project should provide an interactive menu system that allows a user to select the type of object to display.<\/p>\n<p>The following menu items must be provided: V, H, X, R, L, and Q. The meanings of these items are:<\/p>\n<p>V \u2013 V shape<\/p>\n<p>H \u2013 Hat shape<\/p>\n<p>X \u2013 X shape<\/p>\n<p>R \u2013 Right arrow shape<\/p>\n<p>L \u2013 left arrow shape<\/p>\n<p>Q &#8212; quit.<\/p>\n<p>The letter indicates which shape to display and will always be followed by a space and an integer value<\/p>\n<p>representing size of the shape. Valid input can be uppercase as well as lowercase characters. All other letters<\/p>\n<p>entered as command inputs are considered invalid. Provide a mechanism to allow a user to recover from an error.<\/p>\n<p>For example, if the user enters a Z, do not terminate the program. Inform the user that an error has occurred,<\/p>\n<p>display an error message, and discard the erroneous information i.e. if an incorrect command is detected, make<\/p>\n<p>sure to flush the input buffer using cin.ignore(80,\u2019n\u2019).<\/p>\n<p>A valid shape command code will always be followed by an integer valued size. The value provided may not be<\/p>\n<p>acceptable based on the limitations outlined in the table. If you detect an invalid size, display a meaningful error<\/p>\n<p>message, reject the command, and allow the user to enter a new command.<\/p>\n<p>Program Design:<\/p>\n<p>To solve this program, you need to decompose the problem into manageable pieces. Fortunately, the program<\/p>\n<p>naturally breaks into functional units based on the different shapes. Design your solution so that your main<\/p>\n<p>program calls functions to complete the various tasks. For example there should be functions to display each<\/p>\n<p>shape, and there should one or more functions to get a valid command code.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>The purpose of this project is to provide you with practice using conditional statements, loops, and functions. Your task is to write a program that allows a user to display a simple graphic shape using text symbols. Five basic shapes are allowed: V-shape, Hat-shape, X-shape, Right-Arrow-shape, and the Left-Arrow-shape. The shapes are defined as follows: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-108058","post","type-post","status-publish","format-standard","hentry","category-education"],"_links":{"self":[{"href":"https:\/\/assignmenttutors.net\/blog\/wp-json\/wp\/v2\/posts\/108058","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/assignmenttutors.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/assignmenttutors.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/assignmenttutors.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/assignmenttutors.net\/blog\/wp-json\/wp\/v2\/comments?post=108058"}],"version-history":[{"count":0,"href":"https:\/\/assignmenttutors.net\/blog\/wp-json\/wp\/v2\/posts\/108058\/revisions"}],"wp:attachment":[{"href":"https:\/\/assignmenttutors.net\/blog\/wp-json\/wp\/v2\/media?parent=108058"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/assignmenttutors.net\/blog\/wp-json\/wp\/v2\/categories?post=108058"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/assignmenttutors.net\/blog\/wp-json\/wp\/v2\/tags?post=108058"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}