0
6.1kviews
In a garden, trees are maintained. A tree has following set of attributes

Tree code, heights, base and amount spent on the tree so far.

(i) Define Tree class, its constructor, display() and update() that updates tree information.

(ii) Define derive class Mango tree that has additional yield attribute.

(iii) Define Garden class and display information of a tree and a Mango Tree.


Mumbai University > Computer Engineering > SEM-3 > OOPM

Marks: 10M

Year: DEC-15

1 Answer
4
86views
/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author 4g3nt_47
 */
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Tree {
    int code, …

Create a free account to keep reading this post.

and 4 others joined a min ago.

Please log in to add an answer.