12.07.2015 Views

Podsumowanie wzorców projektowych GoF

Podsumowanie wzorców projektowych GoF

Podsumowanie wzorców projektowych GoF

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

}}" is " + topTitle);Klasy wzorca:TopTitlepackage pk.dydakt.to.dp.b.gof.chainofresponsibility;public interface TopTitle {public String getTopTitle();}public String getAllCategories();DvdCategorypackage pk.dydakt.to.dp.b.gof.chainofresponsibility;public class DvdCategory implements TopTitle {private String category;private String topCategoryTitle;public DvdCategory(String category) {this.setCategory(category);}public void setCategory(String categoryIn) {this.category = categoryIn;}public String getCategory() {return this.category;}public String getAllCategories() {return getCategory();}public void setTopCategoryTitle(String topCategoryTitleIn) {this.topCategoryTitle = topCategoryTitleIn;}public String getTopCategoryTitle() {return this.topCategoryTitle;}}public String getTopTitle() {return this.topCategoryTitle;}DvdSubCategorypackage pk.dydakt.to.dp.b.gof.chainofresponsibility;public class DvdSubCategory implements TopTitle {private String subCategory;private String topSubCategoryTitle;private DvdCategory parent;public DvdSubCategory(DvdCategory dvdCategory, String subCategory) {this.setSubCategory(subCategory);this.parent = dvdCategory;}79

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!