package lectures.inheritance_vs_delegation.mvc;
import util.annotations.WebDocuments;

import javax.swing.JOptionPane;

@WebDocuments({"Lectures/InheritanceVsDelegationMvc.pptx", "Lectures/InheritanceVsDelegationMvc.pdf", "Videos/InheritanceVsDelegationMvc.avi"})
public class ACounterWithConsoleAndJOptionView extends ACounterWithConsoleView {
    void displayMessage(int counterValue) {
        JOptionPane.showMessageDialog(null, "Counter: " + counterValue);
    }
    public void add (int amount) {
        super.add(amount);
        displayMessage(getValue());
    }
}