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