PUBLIC Static & Constant fields:
NB, to call static methods in UI class, you need to say: "class name".totalQty |
How to make the UI class:
NB, When calling up the fields whe instantiating the object, MAKE SURE that the field names are the SAME as the constructor in the OOP class! Accessor/Typed methods:
Mutator/void Methods:
|
Field types:
PRIVATE static fields
NB, each private static field needs its own STATIC ACCESSOR method: public static int getTotalQty() { return totalQty; } NB, to call private static field in UI class, use the created accessor method: "class name".getTotalQty() |
Constructors:
The toString method:
|