文档介绍:C++,setupaPoint(dot)classthatcontainsdatamembersx,y(coordinatepoints).ItasabaseclasstoderiveaCircle(round)class,increasethedatamembersr(radius),andthentoCirclefordirectbaseclass,derivedaCylinder(Cylinder)class,adddatamemberh(high)・Towritetheprogram,theoverloadedoperator〃〈〈“and“〉〉〃tobeusedtooutputtheaboveclassobject・Foralargerprogram,thereareseveralstepstotake・Inthefirstclass,wedeclarethederivedclass,stepbystep,andstepbystep・declarethebaseclassPointclassThepartsofthePointthatcanbewrittenoutofthebaseclassareasfollows:#inelude<iostream>//declareclassPointTheclassPoint{public:Point(floatx=0,floaty二0);//constructorswithdefaultparametersVoidsetPoint(float,float);//setthecoordinatesFloatgetX()const{returnx;}//readxcoordinatesFloatgetY()const{returny;}//readycoordinatesFriendostream&operator(ostream&,constPoint&);//overloadedoperator〃〈〈“Protected://protectedmembersFloatx,y;};//thememberfunctionofthePointclassisdefinedbelow//Point,sconstructorPoint:Point(floata,floatb)//tox,yinitializes(x=a;Y二b;}//setthecoordinatesofxandyVoidPoint::setPoint(floata,floatb)//forx,ytonewvalue{x=a;Y二b;}//overloadedoperator〃〈〈“toenabletheoutputpointcoordinatesOstream&operator<<(ostream&output,constPoint&p){theoutput<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<Returntheoutput;pletesthestatementofthebaseclassPointclass・Now,todebugthebaseclassdeclarationyouwroteabove,'(){Pointp(,);//establishthePointclassobject,p<<<<<<<<<<<<<<<<"><<<<<<"><<<<<<z,><<<<<<"><<<<<<z,><<<<<<z,><<<<<<,z>〈〈〈〈〈〈〃>〈〈〈〈〃〉〈〈//(,);//resetthepositionofpCout<<<<<<<<<,z><<<< ><<<<<z,>//overloadingoperator,'<<<<<<<<<<<<<<<<<<<<<<<<<〈〈〃>>,y=6・4P(new):[,]Thetestprogramchecksthefunctionofeachfunctioninthebaseclassandthefunctionofoperatoroverloading,whichprovesthattheprogramiscorrect・declarethederivedclassCircleOntopofthat,writethepartthatdeclaresthed