Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company;
- class NecessaryThings{
- private String Oxygen;
- private String Wood;
- private String Pulp;
- private String Shade;
- private String Shelter;
- private String Frutis;
- }
- class Tree extends NecessaryThings{
- public Tree(){
- super();
- }
- private float Roots;
- private float Trunk;
- private String Crown;
- private int Branches;
- private String leaves;
- private Object String;
- private int NumberOfFruties;
- public String getLiving_Time(){
- return (java.lang.String) (String = "since 1971");
- }
- public int getGiving_Fruits(){
- return NumberOfFruties;
- }
- }
- class EverGreen extends Tree{
- }
- class Deciduous extends Tree{
- }
- public class Earth {
- public static void main(String[] args) {
- EverGreen Tree1 = new EverGreen();
- Deciduous Tree2 = new Deciduous();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement