| ACounterWithConsoleView.java |
package lectures.inheritance_vs_delegation.mvc;
import util.annotations.WebDocuments;
import lectures.mvc.ACounter;
@WebDocuments({"Lectures/InheritanceVsDelegationMvc.pptx", "Lectures/InheritanceVsDelegationMvc.pdf", "Videos/InheritanceVsDelegationMvc.avi"})
public class ACounterWithConsoleView extends ACounter{
void appendToConsole(int counterValue) {
System.out.println("Counter: " + counterValue);
}
public void add (int amount) {
super.add(amount);
appendToConsole(getValue());
}
}