SETSWANA TRANSLATION: Skip to content

mofutakwalo

SETSWANA TRANSLATION: Declares a class — a blueprint for creating objects.

SETSWANA TRANSLATION: Classes group data and behaviour together. Define a constructor with motlhophisi to set up new instances, and create instances with Ntsha.

SETSWANA TRANSLATION: mofutakwalo Leina { ... }
SETSWANA TRANSLATION: A class with a constructor
mofutakwalo Sediko {
  motlhophisi(r) {
    ye.r = r;
  }
}

motlhophisi, Ntsha, ye