Answered step by step
Verified Expert Solution
Question
1 Approved Answer
AQ 1 4 I need an answer whichis perfect and best for this question, need no answer, dpn ' t use gpt , make a
AQ I need an answer whichis perfect and best for this question, need no answer, dpnt use gpt make a diagram if needed
C
Ndzima ya yi hlamuserile tlilasi ya circleType ku tirhisa swihlawulekisi swa xisekelo swa xirhendzevutani. Engetela ku kandziyisa ka ntirho eka tlilasi leyi ku humesa radius, ndhawu, na xirhendzevutana xa xirhendzevutana. Sweswi silindara yinwana na yinwana yi na xisekelo na ku tlakuka, laha xisekelo xi nga xirhendzevutana. Dizayina silindara ya tlilasiMuxaka lowu nga khomaka swivumbeko swa silindara no endla mintirho ya ntolovelo eka silindara. Kuma tlilasi leyi eka xirhendzevutani xa tlilasiType leyi endliweke eka Ndzima ya Mintirho yinwana leyi nga endliwaka eka silindara hi leyi landzelaka: hlayela no kandziyisa vholumo, hlayela no kandziyisa ndhawu ya le henhla, veka ku tlakuka, veka radius ya xisekelo naswona u veka exikarhi ka xisekelo. Nakambe, tsala nongonoko wo kambela matirhelo yo hambanahambana eka silindara. Titekeli enhlokweni leswaku nhlayo ya pi i
xirhendzevutaniMuxaka.h
#ifndef xirhendzevutaniMuxakaH
#hlamusela xirhendzevutaniTypeH
xirhendzevutani xa tlilasiType
rivaleni:
void ku kandziyisa ;
void setRadius r kambirhi;
Ntirho wo veka radius.
Xiyimo xa le ndzhaku: loko r radius r;
handle ka sweswo radius ;
kambirhi getRadius ;
Ntirho wo vuyisa radius.
Postcondition: Nhlayo ya radius yi vuyisiwile.
ndhawu yimbirhi ;
Ntirho wo vuyisa ndhawu ya xirhendzevutana.
Postcondition: Ndhawu yi hlayiwile no vuyiseriwa.
xirhendzevutana xa kambirhi ;
Ntirho wo vuyisa xirhendzevutana xa xirhendzevutana.
Postcondition: Xirhendzevutani xi hlayiwile xi tlhela xi vuyiseriwa.
Muxaka wa xirhendzevutani kambirhi r ;
Muaki loyi a nga na parameter ya default.
Radius yi vekiwile hi ku ya hi parameter.
Nhlayo ya xiviri ya radius i ;
Xiyimo xa le ndzhaku: radius r;
xihundla:
radius ya swiphemu swimbirhi;
;
#endif
xirhendzevutanaTypelmp.cpp
Ku tirhisiwa Fayili ya tlilasi circleType
#katsa na
#katsa "muxaka wa xirhendzevutani.h
ku tirhisa ndhawu ya mavito std;
void xirhendzevutaniMuxaka::print
cout "Radiyasi radius
ndhawu ndhawu
xirhendzevutana xirhendzevutana ;
void xirhendzevutanaMuxaka::setRadiusr kambirhi
loko r
radius r;
xin'wana
radius ;
xirhendzevutani kambirhiMuxaka::getRadius
radius yo vuyela;
xirhendzevutani kambirhiMuxaka::ndhawu
vuyela radius radius;
double circleType::xirhendzevutani
vuyela radius;
Muxaka wa xirhendzevutani::Muxaka wa xirhendzevutanir double
vekaRadius r;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started