יום ראשון, 29 באוגוסט 2010

Chapter 1 Test Blog

The first thing I did was open the coding for the square class. I copied all of the code and pasted in the newly created class "rectangle". I then examined the code and noticed the parameters for the shape was "size", to to create a rectangle I changed the parameters to "width" and "height". When this was done I tested the class by creating an instance and playing around with the measurements. Now came the tiering bit. I looked at the coding for the "picture" class and noticed its layout. It was a method that created instances of the shapes and then they would appear. So what I did was I changed the shapes into the shapes that I wanted, I renamed them, changed their color and then played around with the cordinates until I got the desired picture. 

אין תגובות:

הוסף רשומת תגובה