HW Set 7 - thecubscientist.com
HW Set 7 - thecubscientist.com
HW Set 7 - thecubscientist.com
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
P7C. Below is a class definition for the abstract class “SuperHero”.public abstract class SuperHero{private String suitColor;private boolean hasCape;public SuperHero(){this.suitColor = new String();this.hasCape = false;} // end zero-arg constructor SuperHeropublic void setSuitColor(String suitColor){this.suitColor = new String( suitColor );} // end method setSuitColorpublic String getSuitColor(){return suitColor;} // end method getSuitColorpublic void setCape(boolean cape){this.hasCape = cape;} // end method setCapepublic boolean isCaped(){return hasCape;} // end method isCapedpublic abstract String motto();} // end abstract class SuperHeroPage 4AP Computer Science – <strong>HW</strong> <strong>Set</strong> 7 Programshttp://<strong>thecubscientist</strong>.<strong>com</strong>