"Xi Rao" wrote:
> Hey dude, how did u implement <E> object at the start of code? Like import CITS2200.Deque<E>?
You need simply import CITS2200.Deque, which is an interface that can take a generic parameter
You then want to declare your class:
public class DequeCyclic<E> implements Deque<E> ...
This specifies that your class takes a generic parameter, E, and passess that generic parameter
into the interface it implements.
Do note that the use of generics is optional and you can instead just use Object. If you do not
provide a generic parameter, it defaults to Object. Hence Deque<Object> and Deque are the exact
The auto-tester tests your code as just DequeCyclic, so if you implement it using generics it
will simply test DequeCyclic<Object>, so you can get away with just implementing object