Skip to content
Snippets Groups Projects
Commit a1f4ceb3 authored by Winston Jodjana's avatar Winston Jodjana
Browse files

Update CircularArrayFIFOQueue.java to fit with p1-public

parent 33980eec
No related branches found
No related tags found
No related merge requests found
......@@ -3,18 +3,11 @@ package datastructures.worklists;
import cse332.exceptions.NotYetImplementedException;
import cse332.interfaces.worklists.FixedSizeFIFOWorkList;
import java.util.NoSuchElementException;
/**
* See cse332/interfaces/worklists/FixedSizeFIFOWorkList.java
* for method specifications.
*/
public class CircularArrayFIFOQueue<E extends Comparable<E>> extends FixedSizeFIFOWorkList<E> {
private E[] queue;
private int front;
private int size;
public class CircularArrayFIFOQueue<E> extends FixedSizeFIFOWorkList<E> {
public CircularArrayFIFOQueue(int capacity) {
super(capacity);
throw new NotYetImplementedException();
......@@ -57,17 +50,31 @@ public class CircularArrayFIFOQueue<E extends Comparable<E>> extends FixedSizeFI
@Override
public int compareTo(FixedSizeFIFOWorkList<E> other) {
// You will implement this method in project 2. Leave this method unchanged for project 1.
throw new NotYetImplementedException();
}
@Override
@SuppressWarnings("unchecked")
public boolean equals(Object obj) {
throw new NotYetImplementedException();
// You will finish implementing this method in project 2. Leave this method unchanged for project 1.
if (this == obj) {
return true;
} else if (!(obj instanceof FixedSizeFIFOWorkList<?>)) {
return false;
} else {
// Uncomment the line below for p2 when you implement equals
// FixedSizeFIFOWorkList<E> other = (FixedSizeFIFOWorkList<E>) obj;
// Your code goes here
throw new NotYetImplementedException();
}
}
@Override
public int hashCode() {
// You will implement this method in project 2. Leave this method unchanged for project 1.
throw new NotYetImplementedException();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment