following pseudocode:
Kizspy.me
public interface Notification{
}
public void update(String movie Title, String showTime, int availableSeat);
public class ShowtimeSubject {
private List<Notification>notifications;
private String movie Title;
private String showTime;
private int availableSeat;
public void addNotification (Notification notification) { /* ... */}
public void removeNotification (Notification notification) { /* ... */}
public void notifyNotifications() {
for (Notification notification: notifications) {
notification.update(movie Title, showTime, availableSeat);
}
Zoom
public void updateShowtime(String title, String time, int seat) {
this.movieTitle = title;
+ 100%
Close