Nasdaq Interview Question

Basic OOP.