Homework 4 10-15-09

# Homework 4 10-15-09 - ; cin &amp;amp;gt;&amp;amp;gt;...

This preview shows pages 1–5. Sign up to view the full content.

Alex Fidalgo 10/15/09 Intro to Programming E-115-C, E-115-LK I pledge that I have abided by the Stevens Honor System. _________________________ #include <iostream> #include "ezwin.h" #include "position.h" #include "rect.h" #include "circle.h" #include "triangle.h" #include "square.h" #include "wobject.h" #include "shape.h" #include "bitmap.h" #include "label.h" using namespace std; SimpleWindow W ( "This is a drawing" , 15, 15); int ApiMain() { char mychar; int myint; Position x[2]; cout << "Welcome. Enter an integer " ; cin >> myint; // These happen before you draw your window W.Open(); RectangleShape R1 (W, 4, 7, Red, 5, 6); R1.Draw(); RectangleShape R2 (W, 4, 7, Red, 2, 3); R2.Draw(); R2.Erase(); R2.ClearBorder(); RectangleShape R3 (W, 9, 12, Red, 3, 1); R3.Draw(); CircleShape C (W, Position(8, 5), Blue, 1); C.Draw(); TriangleShape T(W, Position(8, 3), Green, 4); T.Draw(); W.RenderLine(Position(6.0, 7.0), Position(10.0, 10.0), Black, 0.1);

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
cout << "Welcome. Enter a character "

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ; cin &gt;&gt; mychar; //these happen after your draw W.Close(); return 0; } During the installation of exwindows I experienced trouble with getting ezwindows into my Program Files because for some reason, it would not extract. One it extracted properly, everything worked as the instructions said it would. Write ezwindows worked properly, which allowed me to right my program. My source code is here on the first page, which built successfully as seen in figure 1. I proceeded to running the program which opened up the box seen in figure 2, and I typed in a random integer. Doing so, the box in figure 3 appeared with the various rectangles, circles, and triangles attached. Overall the program was a success. Figure 1 shows the successfully built program Figure 2 shows the program running successfully Figure 3 shows the end result of the successful program...
View Full Document

## This note was uploaded on 01/30/2011 for the course ENGINEERIN E-101 taught by Professor Dr.doe during the Spring '09 term at BC.

### Page1 / 5

Homework 4 10-15-09 - ; cin &amp;amp;gt;&amp;amp;gt;...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online