Make getRank() not const; add override's.