Processing 3 Object Class not Being Displayed

Hi. I am a total noob to object classes. I do not know what I am doing wrong. Here’s an image of the prototype:

I am trying to create an object class for the encircled cards.
I have saved the class on a separate page.
I don’t know which piece of code is causing the problem in this case. The main page or the class page.
Here’s the main code where I call the function:

void setup() { 
  size(1200, 750); 
  montserratExtraBold = createFont("montserratExtraBold.ttf", headingSize);
  montserratRegular = createFont("montserratRegular.ttf", callToActionSize);
  y1 = new Timeline_Years();

Here’s the code for the class

    yearOriginX = 132;
    yearOriginY = 171;    
    year = "1900";
    yearColor = #FEFEFE;
    boxOriginX = 163;
    boxOriginY = 124;
    boxColor = #ffffff;
    boxWidth = 74;
    boxHeight = 45;
  void display(){
    rect(boxOriginX, boxOriginY, boxWidth, boxHeight);
    int yearSize;
    yearSize = 20;
    PFont montserratBold;
    montserratBold = createFont("montserratBold.ttf", yearSize);
    text(year, yearOriginX, yearOriginY);    

Here’s a link to the zipped version of the file in case that helps:

Thanks in advance.

You don’t describe what you see (falsely) and what you want to see happening instead

Your screen shot is good but does it show your current false version or what you want to see instead?

When your class represents ONE time card you should define in setup () an Array of that class

And year should be different for each object in the Array

This should be in draw()

Doesn’t the rectangle appear or the text in it or both??

Don’t repeat the textfont stuff in display() you defined in setup globally, so don’t repeat this variable in the class