Added abstract Queue class, implementing common methods and provides the core interface.