Assderived3publicbase blic changereturntype

Info iconThis preview shows page 1. Sign up to view the full content.

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

Unformatted text preview: 清清清 CIMS 清清 class Point3D :public Point { public: Point3D(){}; Point3D(){}; void SetZ( int zv ){ Z = zv;} int GetZ() {return Z;} void Show() { cout<<"X= "<<GetX()<<endl; cout<<"Y= "<<GetY()<<endl; cout<<"Z= "<<GetZ()<<endl; } private: int Z; example2simplepoint }; 7 清清清清清清清清 CIMS 清清 void main() { Point3D P; P.SetX( 100 ); P.SetY( 200 ); P.SetZ( 300 ); P.Show(); } 8 清清清清清清清清 CIMS 清清 清清 清清清“清”清清清 清清清清清清 : public 改 private 改 protected class Derived1 : public Base { // ...}; class Derived2 : private Base { // ...}; class Derived3 : protected Base { // ...}; 9 清清清清清清清清 CIMS 清清 清清清清 清清清清清清清清清清清清清清清清清清清清清清清清清清清清清清清清清 清清清清清清清清清清清清清 • 清清清清清清清清清清清清清清清清清清清清清清清清 清清清清清清清清清清清清清清清清 • 清清清清...
View Full Document

This document was uploaded on 02/25/2014.

Ask a homework question - tutors are online