Fastpages Code.org blog with key learnings
//we can use code below to create a object with a subclass called Writer.
Writer mywriter = new Writer(); //creating an object call mywriter.
//and using the object like give him an order
mywriter.write(); // mywriter(objectname).write(methodname in the subclass)();
//extends like: a subclass "extends" the super class, the subclass can inherits its attributes and behaviors from the super class
//If we want to create a subclass extends a super class we can use the code below
public class Writer extends Jobs {
public Writter(){ //constructor
super() //"super" means the method(attributes and behaviors) in the super class "Jobs" is also access to the subclass "Writer"
}
}
myPatternPainter.paintPattern("white");