Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This code does not work. How can I fix it? The original task was: #include using namespace std; class Tree { public: int age; double

This code does not work. How can I fix it? The original task was:

image text in transcribed

image text in transcribed

#include

using namespace std;

class Tree { public: int age; double height; Tree(int age1, double height1) { age=age1; height=height1; } void setage(int age2) { age=age2; } int getage() { return age; } void setheight(int height2) { height=height2; } int getheight() { return height; } void display() { cout

class Willow : public Tree { private: int numBranch; int flexbility; public: Willow() { numBranch=6; flexbility=7; } void setnumBranch(int numBranch2) { numBranch=numBranch2; } int getnumBranch() { return numBranch; } void setflexbility(int flexbility2) { flexbility=flexbility2; } int getflexbility() { return flexbility; } void display() { cout

void main() { CoconutTree coco(6,4); coco.dispaly(); };

image text in transcribed

image text in transcribed

image text in transcribed

MetroP '11-29% 4:29PM n the comment, at the very beginning of the sour mber and name (COP 2272C-02 Computer Progr time of last successful debugging. Without this, Subject Wite a Cmplte C peeom thel defs umpoments, and tests all 3 classes in the Clas tree shown m the dingam. Here Tre chss is the supercla ss. t h as two Swbdlasses cocomt re and illow All prperties are ru Fist, code there classes, like what we did 'n OOB Irst, code Pyperties utca Methds 2 set and z set methods ontr uc to disploy) pyint curert valnes N arqu Stardard all properties rou) n retun, pint tho. tree's grouth rate,eq. inches Metho

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

T Sql Window Functions For Data Analysis And Beyond

Authors: Itzik Ben Gan

2nd Edition

0135861446, 978-0135861448

More Books

Students also viewed these Databases questions

Question

4. Describe the role of narratives in constructing history.

Answered: 1 week ago

Question

1. Identify six different types of history.

Answered: 1 week ago