Your job is to create an application that will ask user to select a shape to be drawn. Your program will ask the user to enter some information about the shape.

Things to have in your program.

  • You need a menu in your program.
  • The menu must include an exit choice.
  • You need to use functions whenever possible.
  • You need at least one array to save the user's choice.
  • You need to print the shape to the console and to a file.
  • You need to be able to retrieve every shape you save in the file.
  • Any other information you deem important.

What to do.

  • You need to have at least 3 shapes.
  • Ask the user to select a choice.
  • Ask the user some info about the shape (example square needs length and width but a circle needs a diameter)
  • Print the shape to the screen and to a file.
  • Ask the user for the file path (the users need to enter the path).
  • Ask the user if it wants to continue with another choice or quit.

Important information to remember:

You need to make sure to validate the user's input. If you are expecting a numeric value, then entering a string will result in an error.

Output:

  • A shape of asterisk (*)
  • You can use if statements, switch, and loops.
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.