c visual studio

Printing Shapes

Create a program that:

  1. Prompt the user to choose between a rectangle and a triangle
  2. Prompt user for shape parameters
    1. Rectangle
      1. Ask user to choose between supplying a word or a width
      2. Ask user for height
    2. Triangle
      1. Ask user to choose between supplying a word or a width, and whether the triangle points up or down
      2. Read input
  3. Print the desired shape
    1. If the user chooses to draw a rectangle with a word, print it to a file named “shape.txt” in addition to
  4. Ask the user if they would like to exit, or return to step 1

Points:

2 – Documentation, readability, format

3 – Proper program flow (conditionals, loops, etc)

1 – File output

2 – Filename and Header

2 – Output testing

Header

//<Your Name>

//CPSC 120 Lab 4

//<MM/DD/YY>

Filename

<Last Name><First Initial>lab4.cpp

//DrawRectangle(5,3)

*****

*****

*****

//DrawRectangle(“VOTE”, 3)

shape.txt:

VOTE
VOTE
VOTE

//DrawTriangle(4, true)

*

**

***

****

//DrawTriangle(“VOTE”, false)

VOTE
OTE
TE
E

//DrawTriangle(“VOTE”, true)
E
TE
OTE

VOTE

 
Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount!
Use Discount Code "Newclient" for a 15% Discount!

NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.

Buy Custom Nursing Papers