You need to call the constructor:
DeckofCards myDeck = new DeckofCards(); // note parens!
In Java, the parentheses are required.
In the constructor, you will also need to initialize each element of the array to a new Card
object:
for(int s = 1; s<5; s++){
for(int r = 1; r<14; r++){
deck[i] = new Card();
deck[i].rank = r;
deck[i].suit = s;
i++;