lecture8

lecture8 - ISE 582: Information Technology for Industrial...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
ISE 582: Information Technology for Industrial Engineering Instructor: Elaine Chew University of Southern California Department of Industrial and Systems Engineering Lecture 8 JAVA Cup 7: Model-View Design Winston & Narasimhan: Chapt 41, 42
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
7 November 2001 Information Technology for IE 2 GUI Design: Model-View Approach • Class Types • Relations Among Class Types • Turning the Movie Class into an Observable Class • Using the Observer • A Meter Listener for MouseClicks • RECAP
Background image of page 2
7 November 2001 Information Technology for IE 3 Class Types • Model Classes: domain knowledge • View Classes: information-display • Observer / Listener (Adapter) Classes: model-view connections • Application Class: – Creates model/view/observer/listener instances – Connects model->(observer)->view and view- >(listener)->model – Establish container-component relations among views
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
7 November 2001 Information Technology for IE 4 Relations Among Class Types Model View Application
Background image of page 4
7 November 2001 Information Technology for IE 5 Model: Movie Interface import java.io.*; public interface MovieInterface { // Setters public abstract void setScript (int i) ; public abstract void setActing (int i) ; public abstract void setDirection (int i) ; // Getters public abstract int getScript () ; public abstract int getActing () ; public abstract int getDirection () ; public abstract String getTitle () ; public abstract String getPoster () ; // Miscellaneous methods public abstract int rating () ; public abstract void changed () ; }
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
7 November 2001 Information Technology for IE 6 Making Movies Observable import java.util.*; public class Movie extends Observable implements MovieInterface { // Define instance variables : String title, poster; int script=5, acting=5, direction=5 // Define 3-parameter constructor : Movie (int s, int a, int d) // Define 4-parameter constructor : Movie (int s, int a, int d, String
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 18

lecture8 - ISE 582: Information Technology for Industrial...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online