AnsweredAssumed Answered

creating class

Question asked by gisnagy on Mar 20, 2020
Latest reply on Mar 21, 2020 by gisnagy

hi guys, is anybody can help me with this?

Consider a text file called trees.txt with different fields called Block, Plot, Species and DBH, separated by spaces. Every record represents one tree. DBH is the trunk diameter at 4.5 feet from the ground. Create a script with a tree class with the following properties: Block, Plot, Species and DBH. The class should also have one method: diameter inside bark, calculated as DIB = DBH * (1/1.09). Once the class has been created, use the class to create tree objects by reading the data from the text file. The script should print the following: Report Tree 1

Block:

Plot:

Species:

DBH:

DIB:

Report Tree 2

Block:

etc

Outcomes