Answered step by step
Verified Expert Solution
Link Copied!

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

AQ14 I need an answer whichis perfect and best for this question, need no answer, dpn't use gpt, make a diagram if needed
C++
Ndzima ya 10 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 10. 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 hambana-hambana eka silindara. Titekeli enhlokweni leswaku nhlayo ya pi i 3.14159.
xirhendzevutaniMuxaka.h
#ifndef xirhendzevutaniMuxaka_H
#hlamusela xirhendzevutaniType_H
xirhendzevutani xa tlilasiType
{
rivaleni:
void ku kandziyisa ();
void setRadius (r kambirhi);
//Ntirho wo veka radius.
//Xiyimo xa le ndzhaku: loko (r >=0) radius = r;
// handle ka sweswo radius =0;
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 =0);
//Muaki loyi a nga na parameter ya default.
//Radius yi vekiwile hi ku ya hi parameter.
//Nhlayo ya xiviri ya radius i 0.0;
//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::setRadius(r kambirhi).
{
loko (r >=0).
radius = r;
xin'wana
radius =0;
}.
xirhendzevutani kambirhiMuxaka::getRadius ().
{
radius yo vuyela;
}.
xirhendzevutani kambirhiMuxaka::ndhawu ().
{
vuyela 3.1416* radius * radius;
}.
double circleType::xirhendzevutani().
{
vuyela 2*3.1416* radius;
}.
Muxaka wa xirhendzevutani::Muxaka wa xirhendzevutani(r double).
{
vekaRadius (r);
}.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Analysis Using SQL And Excel

Authors: Gordon S Linoff

2nd Edition

111902143X, 9781119021438

More Books

Students also viewed these Databases questions

Question

Design a training session to maximize learning. page 309

Answered: 1 week ago