Jiaqi C.

asked • 01/25/24

Can someone help me write a code for the following, Thank you!

Main Menu

The main menu gives the user a choice of displaying your own art, or the hot air balloon.

If the user chooses your art, your program should display your own original ASCII art (requirements are listed below in the Original Art section). 

If the user chooses the hot air balloon, your program should ask what the size of the hot air balloon should be, and then create the hot air balloon

Hot Air Balloon

The appearance of the balloon will be determined by the size the user enters. You may assume the user enters a number 2 or above (a size 1 balloon doesn't look very good). 

For example, a size 2 balloon is shown below. Note that:

  1. The vertical sections are each 2 tall (since the size is 2). These are made using the characters: / | and \
  2. The top is 4 wide (2x size), and is made using the underscore character _
  3. The bottom of the balloon is 4 wide (2x size) and is made using the equals character =
  4. The basket at the bottom of the balloon is 2 tall (size) and 4 wide (2x size) and is made using the pound/hash symbol #
  5. the connection between the balloon and the basket is always 2 tall (even if size is bigger, this remains 2 tall) and uses the same characters as the vertical pieces: \ | and / It is centered below the balloon/above the basket.
____
/ \
/ \
| |
| |
\ /
\ /
====
\||/
||
####
####


In order to pass most of the test cases, the balloon must match the above exactly, including spaces. There should be no spaces after the last character in the line.


UIC Text on Balloon

If the balloon is size 5 or more, it should have the text UIC, centered vertically and horizontally on the balloon (in the section with straight sides). If the balloon cannot be divided evenly in half, have the text go slightly up or slightly left. (So in the size 6 balloon shown below, there is one fewer line above the UIC text than below, and one fewer space on the left than on the right.)

____________
/ \
/ \
/ \
/ \
/ \
/ \
| |
| U |
| I |
| C |
| |
| |
\ /
\ /
\ /
\ /
\ /
\ /
============
\||/
||
############
############
############
############
############
############


Original Art

If the user chooses to display original art, a creation of your own design should be displayed. Your art should be very different from the pyramid in the previous step. If you want inspiration for your design, Google ASCII art. It should not require any input, so it can be evaluated more quickly when grading (if you'd like to make it depend on size, you can add input and then comment it out when you submit the program, making sure the size gets set to a value that works well).

Your original art must use at least one loop, and it must be between 5 and 80 lines of output, with a maximum width of 100 characters per line, including whitespace (spaces, tabs, etc).

To help with grading, copy and paste your finished art into the comments at the top of your program. Here is an example of my original art, although your original graphic should be different than the example given.

|| || ===++=== /=====\
|| || || // \\
|| || || ||
|| || || ||
\\ // || \\ //
\=====/ ===++=== \=====/



1 Expert Answer

By:

Jessica M. answered • 01/25/24

Tutor
New to Wyzant

PhD with 5+ years of tutoring Computer Science

DJ A.

want this in c++ please, and when option 1 original art is chosen, a unique ascii art should be displayed.
Report

01/25/24

DJ A.

with atleast one loop and and it must be between 5 and 80 lines of output, with a maximum width of 100 characters per line, including whitespace (spaces, tabs, etc).
Report

01/25/24

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.