One interview question from oracle: virtual func

Question:
Please write a virtual function. --From oracle

Signed-off-by: jwang6 <jiangbo.jacob@gmail.com>