package abstractionexample; public abstract class MainAbstract { private String sName; private String sType; private int iQty; public String getsName() { return sName; } public void setsName(String sName) { this.sName = sName; } public String getsType() { return sType; } public void setsType(String sType) { this.sType = sType; } public int getiQty() { return iQty; } public void setiQty(int iQty) { this.iQty = iQty; } public abstract void showInfo(); public static void main(String[] args) { } }
package abstractionexample; public class SubAbstract extends MainAbstract{ @Override public void showInfo() { } //This is an instance and the getters() and setters() should use each instance of this kind of to get values and set values. SubAbstract nSubAbs = new SubAbstract(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)