This is very easy if you undertand subclasses. A stack can be used to evaluate expressions in postfix form. If the input is empty, return the result on the top of the stack. To simplify life you may assume that all the numbers on the input are positive integers. Write the form of this expression based on the prefix traversal.
Most graphics library have a way of drawing geometric forms.
The constructor for a circle should take the center point and radius as arguments and the line constructor should take the two end points as arguments. Hint is in the comment.