Question: 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:

 This code does not work. How can I fix it? The

original task was: #include using namespace std; class Tree { public: int

#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(); };

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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!