draw the decision tree and code according to it