Our programming mentor was able to answer my previous question and help us do this, but in Java.
Code:
public class SuperEncoder implements PIDSource {
//Initialize the encoder
SuperEncoder(int a, int b) {
Encoder enc = new Encoder(a, b);
}
//Return the distance as pidGet
public double pidGet() {
return enc.getDistance();
}
}