P. 1
csphtp1_09

csphtp1_09

|Views: 2|Likes:
Published by Hanan Mahmoud

More info:

Published by: Hanan Mahmoud on Oct 06, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PPT, PDF, TXT or read online from Scribd
See more
See less

04/22/2012

pdf

text

original

Sections

  • Outline9
  • Outline10
  • Outline11
  • Outline12
  • Outline13
  • Outline14
  • Outline15
  • Outline16
  • Outline17
  • Outline18
  • Outline19
  • Outline20
  • Outline21
  • Outline22
  • Outline23
  • Outline24
  • Outline25
  • Outline26
  • Outline27
  • Outline28
  • Outline29
  • Outline30
  • Outline31
  • Outline33
  • Outline34
  • Outline35
  • Outline36
  • Outline38
  • Outline39
  • Outline40
  • Outline41
  • Outline42
  • Outline43
  • Outline44

Chapter 9 – Object-Oriented Programming: Inheritance

Outline 9.1 Introduction 9.2 Base Classes and Derived Classes 9.3 protected Members 9.4 Creating Base Classes and Derived Classes 9.5 Constructors and Destructors in Derived Classes 9.6 Software Engineering with Inheritance 9.7 Case Study: Point, Circle, Cylinder

1

© 2002 Prentice Hall. All rights reserved.

2

9.1 Introduction • Inheritance:
– Classes are created by absorbing the methods and variables of an existing class – It then adds its own methods to enhance its capabilities – This class is called a derived class because it inherits methods and variables from a base class – Objects of derived class are objects of base class, but not vice versa – “Is a” relationship: derived class object can be treated as base class object – “Has a” relationship: class object has object references as members – A derived class can only access non-private base class members unless it inherits accessor funcitons
© 2002 Prentice Hall. All rights reserved.

3

9.2 Base Classes and Derived Classes • • • • An object often is an object of another class Every derived-class is an object of its base class Inheritance forms a tree-like heirarchy To specify class one is derived from class two
– class one : two

• Composition:
– Formed by “has a” relationships

• Constructors are not inherited

© 2002 Prentice Hall. All rights reserved.

9.2 Base Classes and Derived Classes
Ba se c la ss Derived c la sses

4

Student Shape

GraduateStudent UndergraduateStudent Circle Triangle Rectangle CarLoan HomeImprovementLoan MortgageLoan FacultyMember StaffMember CheckingAccount SavingsAccount Inherita nc e exa mples.

Loan

Employee Account Fig. 9.1

© 2002 Prentice Hall. All rights reserved.

9.2 Inheritance hierarchy for university CommunityMembers. . All rights reserved. © 2002 Prentice Hall.2 Base Classes and Derived Classes CommunityMemeber 5 Employee Student Alumnus Faculty Staff Administrator Teacher Fig.9.

3 Portion of a Shape class hierarchy. All rights reserved. 9.2 Base Classes and Derived Classes Shape 6 TwoDimensionalShape ThreeDimensionalShape Circle Square Triangle Sphere Cube Cylinder Fig. . © 2002 Prentice Hall.9.

7 9.3 protected and internal Members • protected members – Can be accessed by base class or any class derived from that base class • internal members: – Can only be accessed by classed declared in the same assembly • Overridden base class members can be accessed: – base. . All rights reserved.member © 2002 Prentice Hall.

All rights reserved. either explicitly or implicitly • override keyword is needed if a derived-class method overrides a base-class method • If a base class method is going to be overridden it must be declared virtual 8 © 2002 Prentice Hall.4 Relationship between Base Classes and Derived Classes • Use a point-circle hierarchy to represent relationship between base and derived classes • The first thing a derived class does is call its base class’ constructor.9. .

} // property X public int X { get { return x.1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 // Fig. All rights reserved. Outline Point.cs // Point class represents an x-y coordinate pair. y. using System. int yValue ) { // implicit call to Object constructor occurs here X = xValue.4: Point. also has implicit call to Object constructor © 2002 Prentice Hall. . Y = yValue.cs 9 // Point class definition implicitly inherits from Object public class Point X and Y coordinates. directly access them // default (no-argument) constructor public Point() { // implicit call to Object constructor occurs here } // constructor public Point( int xValue. } Default point constructor with implicit call to Object constructor Constructor to set coordinates to parameters. declared { private so other classes cannot // point coordinates private int x. 9.

// no need for validation } } // end property X // property Y public int Y { get { return y. . // no need for validation } } // end property Y // return string representation of Point public override string ToString() { return "[" + x + ". } } // end class Point Outline Point.34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 set { x = value. All rights reserved.cs 10 Definition of overridden method ToString Program Output © 2002 Prentice Hall. } set { y = value. " + y + "]".

Show( output.cs 11 // PointTest class definition class PointTest Change { // main entry point for application static void Main( string[] args ) { // instantiate Point object Point point = new Point( 72. MessageBox.X = 10. .Y. 115 ).X + "\n" + "Y coordinate is " + point.cs // Testing class Point. } // end method Main } // end class PointTest © 2002 Prentice Hall.1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 // Fig. "Demonstrating Class Point" ). Outline Create a Point object Calls the ToString method of class Point implicitly coordinates of Point object PointTest. 9. using System. // display point coordinates via X and Y properties string output = "X coordinate is " + point. point.Windows.Y = 10. using System.Forms.5: PointTest. All rights reserved. // set x-coordinate via X property point. // set y-coordinate via Y property // display new point value output += "\n\nThe new location of point is " + point.

int yValue. All rights reserved.cs 12 // Circle class definition implicitly inherits from Object public class Circle { Declare coordinates and private int x. } Circle constructors © 2002 Prentice Hall.6: Circle. y. Radius = radiusValue. y = yValue.1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 // Fig. 9. // Circle's radius // default constructor public Circle() { // implicit call to Object constructor occurs here } // constructor public Circle( int xValue. Outline Circle. } // property X public int X { get { return x. using System.cs // Circle class contains x-y coordinate pair and radius. . // coordinates of Circle's center radius of circle as private private double radius. double radiusValue ) { // implicit call to Object constructor occurs here x = xValue.

} } // end property Y // property Radius public double Radius { get { return radius.35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 set { x = value. } } // end property X // property Y public int Y { get { return y. } set { y = value. } set { if ( value >= 0 ) radius = value. . All rights reserved.cs 13 © 2002 Prentice Hall. } // validation needed // no need for validation // no need for validation Outline Circle.

} } // end class Circle © 2002 Prentice Hall.Pow( radius. Radius = " + radius. } Definition of overridden method ToString // return string representation of Circle public override string ToString() { return "Center = [" + x + ". All rights reserved. . } Outline Circle. " + y + "]" + ".70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 } // end property Radius // calculate Circle diameter public double Diameter() { return radius * 2. } // calculate Circle circumference public double Circumference() { return Math.cs 14 // calculate Circle area public double Area() { return Math.PI * Diameter(). 2 ).PI * Math.

Implicit call to circle’s ToString method © 2002 Prentice Hall.Forms.X = 2. using System. circle. All rights reserved.Diameter() ) + "\n". // set Circle's x-y coordinates and radius to new values circle. Outline Create a Circle object CircleTest.Y = 2.Radius = 4. // display Circle's string representation output += "\n\nThe new location and radius of " + "circle are \n" + circle + "\n". .cs 15 // CircleTest class definition class CircleTest { // main entry point for application. 9.25.5 ).Format( "{0:F}".7: CircleTest. using System. Change coordinates and static void Main( string[] args ) radius of Circle object { // instantiate Circle Circle circle = new Circle( 37. circle.X + "\nY coordinate is " + circle.Y + "\nRadius is " + circle.1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 // Fig. 2. circle.Windows.Radius.cs // Testing class Circle. // get Circle's initial x-y coordinates and radius string output = "X coordinate is " + circle. // display Circle's diameter output += "Diameter is " + String. 43.

circle.Format( "{0:F}". // display Circle's area output += "Area is " + String.Format( "{0:F}". circle.Circumference() ) + "\n".34 35 36 37 38 39 40 41 42 43 44 45 46 // display Circle's circumference output += "Circumference is " + String.cs Call Circle’s Circumference and Area methods for output © 2002 Prentice Hall. All rights reserved.Area() ).Show( output. "Demonstrating Class Circle" ). . } // end method Main } // end class CircleTest Outline 16 CircleTest. MessageBox.

Outline Circle2.1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 // Fig.8: Circle2. int yValue. } © 2002 Prentice Hall. All rights reserved. // Circle2's radius Declare radius as private // default constructor public Circle2() { // implicit call to Point constructor occurs here } Implicit calls to base class constructor // constructor public Circle2( int xValue. Attempt to directly change y = yValue. Radius = radiusValue.cs // Circle2 class that inherits from class Point. 9. using System. double radiusValue ) { // implicit call to Point constructor occurs here x = xValue. . private base class methods } results in an error // property Radius public double Radius { get { return radius.cs 17 Declare class Circle to derive from class Point // Circle2 class definition inherits from Point class Circle2 : Point { private double radius.

PI * Math. 2 ). All rights reserved. } // calculate Circle area public virtual double area() { return Math. Radius = " + radius.34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 set { if ( value >= 0 ) radius = value. } // calculate Circle circumference public double Circumference() { return Math. } // return string representation Circle public override string ToString() { return "Center = [" + x + ".cs 18 Attempt to directly access private base class members results in an error © 2002 Prentice Hall.PI * Diameter(). " + y + "]" + ". } } // end class Circle2 Outline Circle2. .Pow( radius. } } // end property Radius // calculate Circle diameter public double Diameter() { return radius * 2.

Outline 19 Circle2. All rights reserved. .cs program output © 2002 Prentice Hall.

int yValue ) { // implicit call to Object constructor occurs here X = xValue. } Outline Point2. y. // default constructor public Point2() { // implicit call to Object constructor occurs here } // constructor public Point2( int xValue. } // property X public int X { get { return x.9: Point2. All rights reserved. 9. .cs 20 protected so derived classes can directly access them © 2002 Prentice Hall. using System.1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 // Fig. // Point2 class definition implicitly inherits from Object public class Point2 { // point coordinate Declare coordinates as protected int x.cs // Point2 class contains an x-y coordinate pair as protected data. Y = yValue.

cs 21 © 2002 Prentice Hall. All rights reserved. // no need for validation } } // end property X // property Y public int Y { get { return y. . } } // end class Point2 Outline Point2. // no need for validation } } // end property Y // return string representation of Point2 public override string ToString() { return "[" + x + ". } set { y = value. " + y + "]".34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 set { x = value.

. using System. All rights reserved. } Outline Circle3. base class members does not } // property Radius public double Radius { get { return radius. // Circle's radius // default constructor public Circle3() { // implicit call to Point constructor occurs here } // constructor public Circle3( int xValue.1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 // Fig. int yValue. 9. Directly changing protected Radius = radiusValue.cs Class Circle3 inherits from Point2 22 result in error © 2002 Prentice Hall. double radiusValue ) { // implicit call to Point constructor occurs here x = xValue.10: Circle3. y = yValue. // Circle3 class definition inherits from Point2 public class Circle3 : Point2 { private double radius.cs // Circle2 class that inherits from class Point2.

35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 set { if ( value >= 0 ) radius = value.PI * Diameter().Pow( radius. } } // end property Radius // calculate Circle diameter public double Diameter() { return radius * 2. " + y + "]" + ". Radius = " + radius.cs 23 Directly accessing protected members does not result in error © 2002 Prentice Hall. . All rights reserved. } } // end class Circle3 Outline Circle3. 2 ).PI * Math. } // return string representation of Circle3 public override string ToString() { return "Center = [" + x + ". } // calculate Circle area public virtual double Area() { return Math. } // calculate circumference public double Circumference() { return Math.

2.Radius.Y = 2.Forms.25. circle.Y + "\nRadius is " + circle. using System.X + "\n" + "Y coordinate is " + circle.11: CircleTest3. // CircleTest3 class definition class CircleTest3 { // main entry point for application Change coordinates and static void Main( string[] args ) radius of Circle3 object { // instantiate Circle3 Circle3 circle = new Circle3( 37.1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 / Fig.cs // Testing class Circle3.cs 24 Create new Circle3 object Implicit call to Circle3’s ToString method © 2002 Prentice Hall.Diameter() ) + "\n". circle.X = 2. using System.Format( "{0:F}". Outline CircleTest3. 43. // get Circle3's initial x-y coordinates and radius string output = "X coordinate is " + circle. 9. // display Circle3's string representation output += "\n\n" + "The new location and radius of circle are " + "\n" + circle + "\n". // display Circle3's Diameter output += "Diameter is " + String. circle.Radius = 4.Windows. All rights reserved. .5 ). // set Circle3's x-y coordinates and radius to new values circle.

35 36 37 38 39 40 41 42 43 44 45 46 47 // display Circle3's Circumference output += "Circumference is " + String. . "Demonstrating Class Circle3" ). } // end method Main } // end class CircleTest3 Outline 25 CircleTest3. circle. circle.Format( "{0:F}".cs Call Circle’s Circumference and Area methods for output © 2002 Prentice Hall.Area() ).Circumference() ) + "\n". // display Circle3's Area output += "Area is " + String.Format( "{0:F}".Show( output. MessageBox. All rights reserved.

int yValue ) { // implicit call to Object constructor occurs here X = xValue. y. // Point3 class definition implicitly inherits from Object public class Point3 { // point coordinate private int x. 9.12: Point3. using System. // use property X Y = yValue. . // use property Y } // property X public int X { get { return x.cs // Point3 class represents an x-y coordinate pair. } Outline Point3.cs 26 as private © 2002 Prentice Hall. Declare coordinates // default constructor public Point3() { // implicit call to Object constructor occurs here } // constructor public Point3( int xValue. All rights reserved.1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 // Fig.

} set { y = value.cs 27 Methods to set x and y coordinates Overridden ToString method © 2002 Prentice Hall.34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 set { x = value. // no need for validation } } // end property Y // return string representation of Point3 public override string ToString() { return "[" + X + ". // no need for validation } } // end property X // property Y public int Y { get { return y. . } } // end class Point3 Outline Point3. " + Y + "]". All rights reserved.

double radiusValue ) : base( xValue. int yValue.1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 // Fig. // validation needed Outline Circle4. Explicit } // property Radius public double Radius { get { return radius.13: Circle4. // default constructor public Circle4() { // implicit call to Point constructor occurs here } // constructor public Circle4( int xValue. yValue ) { Radius = radiusValue. using System. All rights reserved. 9.cs Constructor with implicit call to base class constructor Constructor with explicit call to base class constructor 28 call to base class constructor © 2002 Prentice Hall. . } set { if ( value >= 0 ) radius = value.cs // Circle4 class that inherits from class Point3. // Circle4 class definition inherits from Point3 public class Circle4 : Point3 { private double radius.

2 ). // use property Radius } // calculate Circle circumference public double Circumference() { return Math. } // calculate Circle area public virtual double Area() { return Math.36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 } } // end property Radius // calculate Circle diameter public double Diameter() { return Radius * 2.cs 29 Method area declared virtual so it can be overridden // use property // return string representation of Circle4 public override string ToString() { // use base reference to return Point string representation return "Center= " + base. } Outline Circle4.Pow( Radius. . // use property Radius } } // end class Circle4 Circle4’s ToString method overrides Point3’s ToString method Call Point3’s ToString method to display coordinates © 2002 Prentice Hall.PI * Diameter().ToString() + ".PI * Math. All rights reserved. Radius = " + Radius.

Format( "{0:F}". using System.Diameter() ) + "\n".14: CircleTest4.cs 30 Create new Circle4 object Implicit call to Circle4’s ToString method © 2002 Prentice Hall. using System. // display Circle4's Diameter output += "Diameter is " + String. 43.25.Y + "\n" + "Radius is " + circle. // display Circle4's string representation output += "\n\n" + "The new location and radius of circle are " + "\n" + circle + "\n". . All rights reserved.1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 // Fig.Radius = 4. circle. // set Circle4's x-y coordinates and radius to new values circle. circle.X + "\n" + "Y coordinate is " + circle.5 ).Forms.Windows.cs // Testing class Circle4. // CircleTest4 class definition class CircleTest4 { // main entry point for application Change coordinates and static void Main( string[] args ) radius of Circle4 object { // instantiate Circle4 Circle4 circle = new Circle4( 37. Outline CircleTest4. 9.X = 2. // get Circle4's initial x-y coordinates and radius string output = "X coordinate is " + circle.Radius. circle.Y = 2. 2.

MessageBox.Area() ).Format( "{0:F}".Circumference() ) + "\n".35 36 37 38 39 40 41 42 43 44 45 46 47 // display Circle4's Circumference output += "Circumference is " + String. All rights reserved. "Demonstrating Class Circle4" ). // display Circle4's Area output += "Area is " + String.cs Call Circle’s Circumference and Area methods for output © 2002 Prentice Hall.Show( output. circle. circle.Format( "{0:F}". } // end method Main } // end class CircleTest4 Outline 31 CircleTest4. .

All rights reserved.9.5 Case Study: Three-Level Inheritance Hierarchy • Three-level inheritance example: – Class Cylinder inherits from class Circle4 – Class Circle4 inherits from class Point3 32 © 2002 Prentice Hall. .

9. // set Cylinder height } Constructor // property Height public double Height { get { return height. // Cylinder class definition inherits from Circle4 public class Cylinder : Circle4 { private double height.15: Cylinder.cs Class Cylinder inherits from class Circle4 33 Declare variable // default constructor public Cylinder() height as private { // implicit call to Circle4 constructor occurs here } Constructor // four-argument constructor public Cylinder( int xValue.1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 // Fig. . that implicitly calls base class radiusValue. yValue. Outline Cylinder. All rights reserved. constructor that explicitly calls base class constructor © 2002 Prentice Hall. double double heightValue ) : base( xValue. } set { if ( value >= 0 ) // validate height height = value. int yValue. using System.cs // Cylinder class inherits from class Circle4. radiusValue ) { Height = heightValue.

Height = " + Height.Circumference() * Height. } } // end class Cylinder ToString method Call Circle4’s ToString method to get its output © 2002 Prentice Hall.Area() * Height. } Outline Cylinder.cs Method Area overrides Circle4’s Area method 34 Calculate volume of cylinder // convert Cylinder to string Overridden public override string ToString() { return base.Area() + base. } // calculate Cylinder volume public double Volume() { return base. All rights reserved.36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 } } // end property Height // override Circle4 method Area to calculate Cylinder area public override double Area() { return 2 * base. .ToString() + ".

radius and height string output = "X coordinate is " + cylinder. Change coordinates. // get new x-y coordinate and radius output += "\n\nThe new location.5.X = 2. radius and height cylinder. cylinder. radius and height cylinder. 5.1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 // Fig. // display Cylinder's Diameter output += "Diameter is " + String. 23. using System.25. .cs // Tests class Cylinder. cylinder.Diameter() ) + "\n". All rights reserved.Y + "\nRadius is " + cylinder.cs Create new cylinder Implicit call to ToString © 2002 Prentice Hall.X + "\n" + "Y coordinate is " + cylinder.Radius = 4.Y = 2. // properties set new x-y coordinate. Outline 35 CylinderTest.16: CylinderTest. // properties get initial x-y coordinate.Height = 10. using System.Forms.Radius + "\n" + "Height is " + cylinder. 9. cylinder. // CylinderTest class definition class CylinderTest { // main entry point for application static void Main( string[] args ) { // instantiate object of class Cylinder Cylinder cylinder = new Cylinder(12.Height. 2.Windows.7).Format( "{0:F}". radius and height of " + "cylinder are\n" + cylinder + "\n\n".

// display Cylinder's Area output += "Area is " + String.Format( "{0:F}". cylinder.Circumference() ) + "\n". "Demonstrating Class Cylinder" ). All rights reserved. Area and Volume © 2002 Prentice Hall. MessageBox.Volume() ). // display Cylinder's Volume output += "Volume is " + String. cylinder. .cs Call methods Circumference.Format( "{0:F}". } // end method Main } // end class CylinderTest Outline 36 CylinderTest.35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 // display Cylinder's Circumference output += "Circumference is " + String.Area() ) + "\n".Show( output. cylinder.Format( "{0:F}".

All rights reserved.9. causes base class constructor to be called. it performs its task and then invokes the derived class’ base class constructor © 2002 Prentice Hall. implicitly or explicitly – Can cause chain reaction when a base class is also a derived class 37 • When a destructor is called.6 Constructors and Destructors in Derived Classes • Instantiating a derived class. .

All rights reserved. Console.WriteLine( "Point4 destructor: {0}". . Y = yValue. // default constructor public Point4() { // implicit call to Object constructor occurs here Console. int yValue ) { // implicit call to Object constructor occurs here X = xValue.WriteLine( "Point4 constructor: {0}".cs 38 Constructors with output messages and implicit calls to base class constructor Output statements use reference this to implicitly call ToString method Destructor with output message © 2002 Prentice Hall. this ). y. } // property X public int X Outline Point4. 9.17: Point4. } // constructor public Point4( int xValue. } // destructor ~Point4() { Console. this ).WriteLine( "Point4 constructor: {0}".1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 // Fig. this ). using System.cs // Point4 class represents an x-y coordinate pair. // Point4 class definition public class Point4 { // point coordinate private int x.

// no need for validation } } // end property Y // return string representation of Point4 public override string ToString() { return "[" + x + ".cs 39 © 2002 Prentice Hall. " + y + "]". } set { y = value. All rights reserved. } set { x = value.36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 { get { return x. } } // end class Point4 Outline Point4. // no need for validation } } // end property X // property Y public int Y { get { return y. .

int yValue.WriteLine( "Circle5 destructor: {0}".18: Circle5. Console. . // default constructor public Circle5() { // implicit call to Point3 constructor occurs here Console.cs 40 Constructors with calls to base class and output statements Output statements use reference this to implicitly call ToString method Destructor with output message © 2002 Prentice Hall. this ). double radiusValue ) : base( xValue. this ). } // constructor public Circle5( int xValue. } // destructor overrides version in class Point4 ~Circle5() { Console.WriteLine( "Circle5 constructor: {0}". this ). 9.cs // Circle5 class that inherits from class Point4. // Circle5 class definition inherits from Point4 public class Circle5 : Point4 { private double radius. All rights reserved.1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 // Fig.WriteLine( "Circle5 constructor: {0}". using System. } // property Radius public double Radius { Outline Circle5. yValue ) { Radius = radiusValue.

} // return string representation of Circle5 public override string ToString() { Outline Circle5.PI * Math. } set { if ( value >= 0 ) radius = value.PI * Diameter(). All rights reserved. } // calculate Circle5 area public virtual double Area() { return Math. } } // end property Radius // calculate Circle5 diameter public double Diameter() { return Radius * 2.35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 get { return radius. 2 ). } // calculate Circle5 circumference public double Circumference() { return Math.Pow( Radius.cs 41 © 2002 Prentice Hall. .

. Radius = " + Radius.69 70 71 72 73 74 // use base reference to return Point3 string return "Center = " + base.ToString() + ". } } // end class Circle5 Outline Circle5.cs 42 © 2002 Prentice Hall. All rights reserved.

5 ). 5. . 9. Console.GC. } // end method Main } // end class ConstructorAndDestructor Outline 43 ConstructorAndDe structor. // instantiate objects circle1 = new Circle5( 72. circle2 = null. All rights reserved. using System. 10 ).Collect(). // ConstructorAndFinalizer class definition class ConstructorAndFinalizer { // main entry point for application. // inform garbage collector to execute System. circle2. static void Main( string[] args ) { Circle5 circle1.cs Create two objects of type Circle5 Remove references to Circle5 objects Run the garbage collector © 2002 Prentice Hall.1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 // Fig.19: ConstructorAndDestructor. circle2 = new Circle5( 5. // mark objects for garbage collection circle1 = null.cs // Display order in which base-class and derived-class constructors // and destructors are called. 29. 4.WriteLine().

5 Point4 destructor: Center = [72. Radius = 4.5 Outline 44 ConstructorAndDe structor. Radius = 4. 29].5 Point4 constructor: Center = [5. 5]. 29]. 5]. . Radius = 0 Circle5 constructor: Center = [72. 29]. Radius = 10 Point4 destructor: Center = [5.Point4 constructor: Center = [72. 5]. Radius = 10 Circle5 destructor: Center = [5. All rights reserved. Radius = 10 Circle5 destructor: Center = [72. 29]. Radius = 4. Radius = 0 Circle5 constructor: Center = [5.cs program output © 2002 Prentice Hall. 5].

.9.7 Software Engineering with Inheritance • Can customize derived classes to meet needs by: – Creating new member variables – Creating new methods – Override base-class members 45 • . All rights reserved.NET Framework Class Library(FCL) allows full reuse of software through inheritance © 2002 Prentice Hall.

.

.!4394-0.88!439 70.9  .%0893.88!43925.890%4$9732094/ :83 $8902 :83 $8902 3/48 4728 41..90.9  .

.

30.!439%089.88/013943 .447/3..88 !439%089 .90841!4394-0.9    ..

.

78    .55.2.943  89.3 8973(..4/ .9..303975439147.

.

9  !439543930 !439      .39.389.90!4394-0.

.

5439.908 5439   3 ./85...3/574507908  8973 4:95:9.447/3.908 5439    5439   .908.447/3.447/3.

.

809 .5745079  5439  .447/3.90..

.

.5745079   .447/3.809 .90.

.

04 $4 4:95:9 0243897.:0  4:95:9 33%0304..305439.9434154398 5439   088.88!439    <./85.93..

.

3   <.03/2094/.

.

 79870807.8 _  !7039.88!439%089 :930 !439%089 .0/ .03/.0..

 .

.

8 .0 .  7.

.

./:8  :83 $8902 7.7.439.38 .88.8  .447/3.905.3/7.0 .0.7.

.

9 5:-..0  0.88/01394325..88 7.70.9039  .9307981742 -0..447/3.908.7..0..3/  57.

.

/:8.90  57..03907 7.447/3.90/4:-0 7.857.0 8.7..0../:841.908417.

.

0 87.7./:8   .

.

43897:.:9.947  5:-. 7.0    ./01.

.

9.9.43897:...94 -0.9474.:78070  <   .25.

.

:0 /4:-0 7..:0     . 7.43897:.0.947 7./:8'.43897:.9478  5:-.:0 39 '.0 39 '.

.

25..94 -0.:78070  '.9474.9.43897:../:8'.:0  #.:0  '.9.:0  <   ./:87.

.

0.5745079  5:-.0/ :930 .39      09    709:73   <  _  !7039. 79870807.

:0..                                       809  .

.

/.34300/147..943 < <.

.

03/5745079 .

.

:0 .39   09  709:73  < 809  ..5745079 5:-.

.

./.943 < <.34300/147.

.

03/5745079 .

.

/:8 < 809  1 < .:0   ./:8 5:-./4:-0 #../:8  09  709:73 7.5745079#.

.

0/ .8 _  !7039.:0 :930 7.943300/0/ 7./.. 79870807.0 ..0../:8.

                                 :930 <.

.

/:8 .03/5745079#.

.

.20907  709:73 7./:8  < ../4:-0 .20907 5:-.:..907.0/.

.

907.9 ! . /4:-0 7.0 5:-.0  709:73 .:210703..:.7.:210703..20907  < ..0.

.

8 013943414../4:-0 70./:8  < 7.  709:73 .9 ! .70. 5:-.0.0 .:.9 !4 7..907.077//03 2094/%4$973  ..

.

943417.0 5:-.077/08973 %4$973  709:73 03907     ( #.709:738973705708039./:8 < <.4./:8 7.

.

0..03/. 79870807.887.0 _  !7039.0/ .

 .

.

  7.8 .0%089 .

.

7.887.90.%0893.0  70.9 :83 $8902 :83 $8902 3/48 4728  ..04-0.

.

88 7.0%089.7..0%089    ..88/013943 .

.

447/3.4/ .30.943 .04-0.78 7.9    .3 8973(.303975439147...55.9./:8417.908.3/  89.2.

.

0.0        .030 7.0  7.389.907.7.39.

.

447/3.7.0    3.447/3.0 839.908.3/7./:88  .0 #./:8    .447/3. .0  3#.7.908 .097./:8  8973 4:95:9.908 .7.

.

:08  ./:8    .7.447/3.0   .3/7./:89430..7.7.0   .8097.0 #.908.0 8 .

.

/85.703 .7.943.7.0 3  .0 88973705708039./:841  .0.943  4:95:9 33%0304.7..3/7.

.

/85.7.94.0 8 %4$9732094/ _  !7039. 79870807.0%089 .7.9  < .0 .0.20907   3  :930 7.209078  $973 472.7.9.0 8/..8 25.20907    4:95:9 .0/ .

  .

.

:210703.:210703.:210703.9  < .0 7.7.8  .0  4:95:9 7.0%089 .0 8.0   3  7./85.7.7.08  $973 472.

.

04 $4 4:95:9 0243897.887.8  7.3/70./85.0.  $973 472.0 8.0     < .7.0 8  4:95:9 70.   2094/81474:95:9  088.9  < .93.7. .0 70.7.70.:210703.

.

3  <.03/2094/.

.

887.0%089 :930 _  !7039.0/ . 79870807..03/.0.

 .

.

8 .  7.0 .

.

01742.88!439 0.887.70.7..0.9307981742.8  ..094  /07.88!439 :83 $8902 7.889.0 ....

.

90  57.0./:8./:8.88/013943307981742!439  ..857.707.0!439  0.88 7...90 /4:-0 7...7.

.

0 87.43897:.947  .7..88..9.894-.80./:8   25.

.

:9.0    ./01.43897:.947  5:-. 7.

.

9.:78070  <   .94!439.43897:...25.9474.

.

. 7.:0 39 '.43897:./:8'.:0 /4:-0 7.:0    .947  5:-.0 39 '.

.

30  '../:87..25.:0  #.:0 99025994/70.882094/8  < 708:983..9.94!439..:0 57.80.307747   .:78070  '.9474.43897:.9.90-./:8'..

.

/:8    09     709:73 7.0. 79870807./4:-0 #.5745079#.0/ ./:8  5:-./:8  <  :930 _  !7039.

  809    1 ./:8..:0   7.:0  <    <..

.

/:8  .03/5745079#.

.

/4:-0 .20907    709:73 7.0/.:./:8   <   .20907   5:-.907....

.

.0..907./4:-0 7.:..:210703.:210703.7.0  5:-.20907   <   .0     709:73 .9 ! .

.

/4:-0 .0..    709:73 ../:8    <    ..70.70.9 !4 7.79:.907.  5:-.:..9 ! .

.

0  5:-.4.709:738973705708039.9437.077/08973 %4$973    709:73 03907     (  #./:8  <  <./:8 7.

.

0 :930 7..0.887.03/. 79870807..90-.307747 _  !7039.0/ .0 .8 99025994/70...88202-078 708:983.80.9.088 57..

24:95:9 _  !7039. :930 7.8 5747. 79870807.0/ .0 .0.

 .

.

  !439 .8 .

.

9.905.88.3 .447/3.  :83 $8902  .439..!439.90//.857490.38.7.

.

9 5:-.!439.88/01394325..9307981742 -0..88 !439   ..

.

90/84/07.0/.5439.8808  .088902  .447/3...90/39   57490.8  57490.3/70..9.70..908..447/3.90 0.

.

/01.:9.43897:. !439    .947  5:-.

.

9474.94 -0.9.43897:.9...:78070  <   .25.

.

.:0 39 '.43897:.947  5:-. !439 39 '.:0     .

.

9.:78070  '.94 -0.:0  '..9.43897:.25..9474.:0  <   .

.

0/ .39     09     709:73   <  :930 !439 .5745079  5:-.8 _  !7039. 79870807.0.

.  809    .:0.

.

943  <   <./.34300/147..

.

03/5745079    .

.

:0 .39    09    709:73   <   809     .5745079  5:-..

.

/..943  <   <.34300/147.

.

03/5745079   .

.

077/08973 %4$973    709:73      (   <  <.94341!439  5:-.4.709:738973705708039.

.

 79870807.8 _  !7039.0/ ..88!439 :930 !439 .03/.0.

 .

.

8 .   7.0 .

.

.0..889.8  .0 .7.9307981742.88!439  :83 $8902 7.

.

030798  57.88/013943307981742!439  5:-.887.0!439  ..7.90/4:-0 7.0../:8...88 7.

.

7.0 87./:8 1742!439    .

.

/01.:9.43897:. 7.0    .947  5:-.

.

9474.94!439..25.:78070  <   .9..43897:.

.

.43897:.947  5:-.:0 /4:-0 7./:8'.:0 39 '.:0     .0   39 '. 7.

.

:0 70.9.25..3357490..88202-078/408349  <  708:9307747  .80.:78070  '.9.:0  './:8'.:0 -.9474..94!439.90/  #./:87..43897:.

.

 79870807./4:-0 #.5745079#.0./:8  <  _  !7039./:8     09    709:73 7.0/ :930 ./:8  5:-.

../:8.  809    1 .:0  <    <.:0   7.

.

/:8  .03/5745079#.

.

./:8   <   ./4:-0 .0/.:..907..20907   5:-.20907    709:73 7.

.

:210703.0   5:-./4:-0 7..:.7...20907   <   .0    709:73 .9 ! .:210703.90.

.

9 ! .70.:.../:8    <    .907.79:..  5:-. /4:-070..    709:73 .9 !4 7.0.

.

0  5:-.4./:8  <  <.077/08973 %4$973    709:73 03907     (  #./:8 7.943417.709:738973705708039.

.

0/ .0 :930 7.9.90/202-078 /408349708:9307747 _  !7039.0..0883 57490. 79870807.0 ..8 70.887.03/..

 .

8 .  7.0%089 .

.

%0893.887.0  :83 $8902 7..0%089 .8 :83 $8902 3/48 4728  .

.

7.0%089...88 7.88/013943 .0%089    .

.

.943 .2.447/3.4/ .04-0.9    .3 8973(.30./:8417.303975439147.78 7.908.55..9.3/  89.

.

0       70.0.7.389.030 7.9  .39.04-0.90307.0  7.907.

.

0  3  .447/3./:8  8973 4:95:9.7.908 .7.0  3#.7.447/3.908.447/3.097./:88  . ./:8    .0 #.3/7.908 .0 839.

.

/:8    .7.0   .8097.3/7.447/3./:89430.7.0   ..:08  .0 8 .908.0 #.7.

.

7.943  4:95:9 33  %0304.9.0 3 7.7.943.0 8%4$973   2094/  ../:841./85.0.70 25.94  3 .3/7.0 88973705708039.7..

.

0 8.0 .209078  $973 472. 79870807.7.20907  4:95:9 .0/ :930 ./85.0.20907   3  _  !7039.7.9  < .

  .

.

0%089 ./85.:210703.08  $973 472.0  4:95:9 7.8  .0   3  7.7.:210703.0 87.7.0 7.9  < .:210703.

.

.93.0 8   4:95:9 70.3/70.7.0 70.8  7.0 870.0.0     < ./85.9  < .887.04 $4 4:95:9 0243897.  $973 472.:210703.7.7.   2094/81474:95:9  088.

.

3  <.03/2094/.

.

.0.0%089 :930 _  !7039. 79870807.887.03/.0/ .

 .

.

  !439 .8 .

.

.!439.447/3.8  .7  :83 $8902 !439 .905.887057080398.3 .

.

88 !439   .88/01394325.!439.9307981742 -0.9 5:-....

.

447/3.908..857.447/3.90  57.9039   0.90   .70...5439.

.

/01.947  5:-.43897:.:9. !439    .

.

9.:78070  <   .9474.25.43897:..94 -0..9.

.

43897:.947  5:-. !439 39 '..:0     .:0 39 '.

.

9..43897:.94 -0.9.9474.25..:78070  '.:0.

.

:805745079  '.:0.

.

:805745079  <   .

.

0.5745079  5:-.39     09     709:73   <  :930 _  !7039.0/ . 79870807.

.:0 .  809    .

.

34300/147..943  <   < ./.

.

03/5745079    .

.

39     09    709:73   <   809     .:0.5745079  5:-..

.

943  <   <../.34300/147.

.

03/5745079   .

.

077/0 8973 %4$973    709:73      (   <  <.4.94341!439  5:-.709:738973705708039.

.

 79870807.077//03%4$9732094/ _  !7039.88!439 :930 !439 .3/..908 .03/.0/ .447/3.0.8 094/894809 .

 .

.

0 .  7.8 .

.

88!439  :83 $8902 7.0.7...889.0 .8  43897:.9307981742.9479 .

.

90/4:-0 7.94-.88...9.9479  ..80  .947  57../:8   43897:.7..88/013943307981742!439 5:-.0!439 25.43897:.88 7.0..

.

/01.43897:. 7.43897:.9.88.947  5:-.0 05.:9.94-.80   ..947  ..

.

9474.43897:..:78070  <   .94!439..25.9.

.

:0 39 './:87./:8'./:8'.:0 5.0 39 '.43897:.94-.:0  -.:0 /4:-0 7..80 '.43897:..:0     #.9. 7.947  5:-..88.80  < .947  .:0 '.

.

/:8   5:-./:8    09    709:73 7.5745079#./:8   <   809    1 ./4:-0 #..:0  .

.

.0/ :930 ./.  7..:0 79870807.0.943300/0/ _  !7039./:8..

  <   <.

.

0 ./:8  7.8   .03/5745079#.

.

907.20907  5:-..:../:8 .0/./4:-0 ..20907    709:73 #.

.

:805745079#./:8  <   .

.

3-04.0  5:-.9 ! ..70/.0    709:73 ..70..0.:210703.20907    < 094/.:..077//03  ./4:-0 7./0.79:..  849.:210703.907.7.

.

 5:-./:8  ..    709:73 ./4:-0 70..9 ! .9 !4 #.0.907.79:.:.70...

.

0 8%4$9732094/  <  4.077/08!439 8%4$973  .:805745079 7.

.

0 2094/  5:-.709:738973705708039.943417.077/08973 %4$973     .4.

.

807010703.094709:73!4398973705708039.943 .!439 8%4$973  709:73 03907 -./:8 #./:8.80 %4$973   #.:80-.

.

:805745079#.  < .447/3./:8 2094/94/85.908  <.

.

887.03/. 79870807.0/ .0 :930 _  !7039..0.

 .

.

8 .0%089 .  7.

.

887..%0893.8 :83 $8902 3/48 4728  .0%089 .0  :83 $8902 7.

.

..7.88 7.88/013943 .0%089    .0%089.

.

3/  89.943 .3 8973(.04-0.303975439147.55./:8417.447/3.908.2..9.9    ..30.78 7.4/ .

.

030 7.0       70.907.90307.39.04-0.7.0  7.0.9  .389.

.

 .7.908 .447/3.908 ./:8    ./:8  8973 4:95:9.0  3   #.0 839.3/7.7./:88 .447/3.0 #.097.447/3.908.0  3  .7.

.

0   .0 8 .:08  ..7.447/3./:8    ./:89430.7.0 #.7.8097.908.0   .3/7.

.

7.0 3 7.0 88973705708039.94  3 ..70 25.0.943..3/7.0 8%4$973   2094/  .7.9.943  4:95:9 33  %0304.7./:841./85.

.

20907   3  _  !7039.7.9  < .0 8.7.209078   $973 472. 79870807.0./85.0/ :930 .20907  4:95:9 .0 .

  .

.

0  4:95:9 7.7.0 87.0%089 .0   3  7.:210703.:210703.08  $973 472.8  .:210703./85.0 7.9  < .7.

.

.   2094/81474:95:9  088.3/70.93.0 870.8  7.7.9  < ./85.0 70.887.:210703.  $973 472.0     <.7.0.04 $4 4:95:9 0243897.0 8   4:95:9 70.7.

.

03/2094/.3  <.

.

0%089 :930 _  !7039..887.0/ .0. 79870807.03/.

00.887.03079.0 ...250 .  .0 07.03079.883/07 307981742.3.80$9:/%700 0. W %700 0.0 307981742.3.7. 79870807.0/ .0.887.88!439 _  !7039.

 .

.

8 .  3/07 .

.

.0  :83 $8902 3/07 ..887.8  .88307981742.3/07.

.

.90/4:-0 09   0.887....0  1742.883/0730798  5:-.-0  ...0  57.7.88 3/077..70.88/0139433079817427.3/07.0 .

.

3/07 09./01.857.:9..90    .947  5:-.43897:.

.

25.9..80  .9.8-.9479..0.9  25..43897:.9474.:78070  < 43897:.947.

.

/:8'.:0     0909'.43897:.:0 -.:0.947 .80 '.43897:.:0   /4:-0 09'. 3/07 39 '.14:7 .7:2039.:0 /4:-0 7.:0 39 '.947  5:-.88.:0 7..:0 './:8'.

.

80 .9479.8-.9  05.9.8093/0709  < 43897:..

.

574507909  .:0  .43897:...947  5:-.88./4:-0 09    09    709:73 09   <   809    1 .

.

0/ :930 ..9009 _  !7039./.:0 79870807..0.  09..

  <   <.

.

8   .03/574507909  3/07 .

.

0 870.4.80 7.903/07.4.2094/  <   .077/07.  5:-.02094/70.80 70.077/08    709:73  -. 094/70.077/0/4:-070.4.0  09 7.70.94..:210703.  -.:..

.

 09   <   ..:..80 70./4:-0 '4:20 .:..4:2041..903/07.3/07    709:73-.4:20  5:-.90.

.

077//03%4$9732094/  5:-.80 %4$973  09 09  <  .0 8%4$973 <.7.43.4..0793/07948973 .077/08973 %4$973    709:73-.

.

 79870807..883/07 :930 2094/9409984:95:9 _  !7039.0.03/.0/ .

 .

.

  3/07%089 .8 .

.

883/07  :83 $8902 3/07%089 .8 :83 $8902 3/48 4728  ..%0898.

.

88/013943 .3/07%089...88 3/07%089    .

.

9030..943  89.3/07  .3 8973(.55.9.78   70.4/ ..303975439147.2.

.

39..883/07  3/07.389.904-0.941.3/0730 3/07          .

.

447/3.90 7.3/07 09    .908 .447/3.3/09  8973 4:95:9./:8.908 ./:8 3 098 . .5745079080939.447/3./:88  .3/07  3  .3/07  3#.3/07 #.

.

90 7./:8  7.3/07  ./:8.3/09  .3/09  .447/3.3/07 #.3/07   ./:8.908   .57450790880930 .447/3.30.3/07 09    .

.

3/0941  ./:8  4:95:9 33%0304.943 7.9.3/7..90.447/3.3/07.0930 .3/07 33   25..94%4$973  .703 ./:8.

.

3/07 8.9  < .209078  $973 472.3/07 .20907  4:95:9 . 79870807./85.0/ :930 .20907   3  _  !7039.0.

  .

.

9  < .08  $973 472.:210703./85.:210703.0  4:95:9 7.3/07 87.0   3   .:210703.3/07 7.

.

  3  .  4:95:9 70.3/07 70.9  < ./85.3/07 870.8  $973 472.

.

/85.04 $4 4:95:9 0243897.883/07    <.3/07 8'4:20   4:95:9 '4:208  $973 472.3/07 '4:20     088.93.9  < .

.

3   <.03/2094/.

.

883/07%089 :930 3/07%089 .3/'4:20 _  !7039.0/ .0.0  70. 79870807.8 ..2094/8 7.03/..:210703.

84.0/ .0/ 950714728989...:808-...370.39...  43897:.80..88 .888./07.88 .0/ ..88 -..9478307.80.0/ .3/0897:..3.3/9033./07.0/ 25.9478.-. 79870807.8 .93../0897:.88 .94794-0.0/.80.40890/07.94303.9 .94705.8808 W 389.:80.0/.88 W 03.0.43897:..43897:.9478.947 _  !7039.

 .

.

8 .  !439 .

.

!439..7  :83 $8902  .905.447/3.887057080398.3 .

.

..88/013943 5:-.88 !439   ..!439.

.

9039     .447/3.5439.90   57..

.

/01.947  5:-. !439    .43897:.:9.

.

.25.9.9474.43897:.9.:78070  43840 79030 !439..43897:.94 -0.947 < 98   <  .

.

:0 39 '. !439 39 '.:0    .43897:..947   5:-.

.

:0  43840 79030 !439.9.9474..25.947 < 98   <   .:0  '.94 -0.43897:.43897:..9.:78070  '.

.

947  =!439     43840 79030 !439/0897:.947 < 98   <   ./0897:.

.

..8 43897:.43897:.9479 4:95:92088.0989425.39  :930 !439 .9.947 :95:989.80.5745079  5:-.0/ .8 94-.3/25.9020398:80 7010703.%4$9732094/ 0897:.947894:95:9 2088.0 _  !7039.88.08. 79870807.0.9 ..

    09    709:73    <   809    .:0 ..

.

.943  <   <.34300/147./.

.

03/5745079  .

.

5745079    5:-.39     09    709:73   <   809    ..:0.

.

34300/147.943   <   <./..

.

03/5745079   .

.

94341!439  5:-.4.077/08973 %4$973    709:73      (  <   <.709:738973705708039.

.

 79870807.03/.88!439 :930 !439 .8 _  !7039.0.0/ ..

 .

.

  7.8 .0 .

.

88!439  :83 $8902  .889.9307981742.0..7..

.

0!439   57..88/013943307981742!439 5:-.88 7../:8    .0.90/4:-0 7...7.

.

/01.43897:.947  5:-.:9. 7.0    .

.

43897:.9.:78070  43840 79030 7.0.947 < 98   <   .9474.94!439..43897:..25.

.

:0 '.:0    #.947  5:-. 7.:0 /4:-0 7.43897:.43897:.:0   -.0..:0  43840 79030 7./:8'.947 < 98   <   ./:87.80 '.0 39 '.:0 39 './:8'.

.

/0897:.0    43840 79030 7.078433.9474.0/0897:..88!439  =7.947 < 98    <   .077/08.

.

0 _  !7039.9020398:80 7010703.80.88.9 .0 .0989425.94789 ./:8   :930 7.%4$9732094/ 0897:.5745079#.9020398 :95:989.8 43897:./4:-0 #..3/ 4:95:989../:8  5:-..9479 4:95:92088. 79870807.0.0/ .894-.

                                      09  709:73 7./:8 < 809  1 < <.

.

/:8 .03/5745079#.

.

/:8  < .0/..20907 5:-..:../4:-0 .907.20907  709:73 #.

.

907.0 5:-..:210703..0.0  709:73 .9 ! .7.:210703./4:-0 7.20907  < ..:.

.

79:..:0  7..  709:73 ..:0 :930 7./4:-0 70.907.9 ! .9 !4 #..70.8  ./:8  < ...0. 5:-.0 .:./:8.

.

0 5:-.709:738973705708039.077/0 8973 %4$973  _  !7039.0/ . 79870807.943417.0. 4.

  .

.

/:8 #./:8  <  <.:80-.094709:73!4398973   709:73 03907 -.80 %4$973    #.807010703.

.

8 _  !7039.0 .0.0/ .0 :930 7.. 79870807.887.03/.

 .

.

8 .  43897:.9473/0897:.947 .

.

85.88.80 ..0/ ..43897:.47/073.88.9478 .3//07.-.

.

3//0897:..9478.947 .8  ..0/  43897:.9473/0 :83 $8902 897:.70.

.

9473/3..88/013943 .9473/3.43897:.88 43897:..07    .07.

.

303975439147..9.78    7.3 8973(.55.0   ..2.943  89.0 .7.7.0.4/ .

.

7.0  43840 79030      .90944-0.7.0       .98 70.030 7.39.98  .904-0.030 7.0     419507.389.

.

04-0.74-0.03: #024.7.07010703.2.98147.40.0.03: 947.943  .98   .7.08  .7-.

.

9  #:390.947   <.31472.0.0.9479400.:90  $8902  40.40.7-.40.7-.

.

03/2094/.3    <.

.

9473/0897:.947 :930 _  !7039..03/.0.8843897:. 79870807.0/ .

43897:.43897:.0.43897:.94703907 (#.94703907 (#.9473/0 897:.947 .0/ .94703907 (#.0/0897:./:8 !439/0897:./:8 7./:8 7. 79870807.94703907 (#./:8 7. !439.0.24:95:9 _  !7039./:8  !439.0.94703907 (#.0/0897:./:8 7.94703907 (#.94703907 (#./:8  :930 43897:.94703907 (#.43897:./:8  !439/0897:.8 5747.

-08 70. 79870807.93302094/8 .9330202-07.:89420/07...0/.88202-078 W %7.3.80 .8808942009300/8- 70.077/0-..0 _  !7039.7  .  $419.2047.7033007393079.0.481: 70:80418419.0/ .0 W .3.3.70974:3079.88-7.7.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->