Chapter_CircleClass

Chapter_CircleClass - Extra Chapter OBJECT ORIENTED...

Info iconThis preview shows pages 1–18. Sign up to view the full content.

View Full Document Right Arrow Icon
Extra Chapter OBJECT ORIENTED PROGRAMMING – Circle Class
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 CIRCLE OBJECT EXAMPLE Point Class Review: Class statement for Advance Point object
Background image of page 2
3 CIRCLE OBJECT EXAMPLE Point Class Review: Implementations of all other Methods (Member Functions) in Point class Implementations of Constructors in Point class
Background image of page 3

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

View Full DocumentRight Arrow Icon
4 CIRCLE OBJECT EXAMPLE Circle Class Statement: Constructors in Circle class Member variables Other methods in Circle class
Background image of page 4
5 CIRCLE OBJECT EXAMPLE Constructors’ Implementations: creates Circle object with unit radius, center at the origin Point object is passed three double variables are passed
Background image of page 5

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

View Full DocumentRight Arrow Icon
6 CIRCLE OBJECT EXAMPLE Implementations of other Methods: Finds diameter Finds area Finds circum- ference
Background image of page 6
7 CIRCLE OBJECT EXAMPLE Implementations of other Methods: Checks if passed Point is inside calling Circle Checks if calling Circle has larger radius than passed Circle Checks if calling Circle and passed Circle overlap
Background image of page 7

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

View Full DocumentRight Arrow Icon
8 CIRCLE OBJECT EXAMPLE Implementations of other Methods: Moves center point of calling Circle centerAt overload Shrinks (k<1)or Stretches (k>1) Pints center point and radius of calling Circle print() Method from Point class
Background image of page 8
9 CIRCLE OBJECT EXAMPLE Main Function 2.5 y 2 x p1
Background image of page 9

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

View Full DocumentRight Arrow Icon
10 CIRCLE OBJECT EXAMPLE Main Function y 2 x p1 0.5 y 0.25 x p2 y x 0 0 1 radius c1 - 6 center
Background image of page 10
11 CIRCLE OBJECT EXAMPLE Main Function y x 0 0 1 radius y x 2 2.75 radius c1 c2 - 6 center center
Background image of page 11

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

View Full DocumentRight Arrow Icon
12 CIRCLE OBJECT EXAMPLE Circle :: print ( ) y x 0 0 1 radius y x 2 2.75 radius c1 c2 - 6 center center
Background image of page 12
13 CIRCLE OBJECT EXAMPLE Circle :: print ( ) y x 0 0 1 radius y x 2 2.75 radius c1 c2 - 6 center center
Background image of page 13

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

View Full DocumentRight Arrow Icon
14 y x 0 0 1 radius y x 2 2.75 radius c1 c2 - 6 CIRCLE OBJECT EXAMPLE Circle :: print ( ) center center
Background image of page 14
15 CIRCLE OBJECT EXAMPLE Circle :: print ( ) y x 0 0 1 radius y x 2 2.75 radius c1 c2 - 6 center center
Background image of page 15

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

View Full DocumentRight Arrow Icon
16 CIRCLE OBJECT EXAMPLE Circle :: print ( ) y x 0 0 1 radius y x 2 2.75 radius c1 c2 - 6 center center
Background image of page 16
17 CIRCLE OBJECT EXAMPLE Circle :: area ( ) y x 0 0 1 radius y x 2 2.75 radius c1 c2 - 6 center center
Background image of page 17

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

View Full DocumentRight Arrow Icon
Image of page 18
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/05/2011 for the course CGS 2421 taught by Professor Onal during the Fall '09 term at University of Florida.

Page1 / 38

Chapter_CircleClass - Extra Chapter OBJECT ORIENTED...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online