140 likes | 287 Views
IFS410 Advanced Analysis and Design. Week 1 Introduction to Java: Applications. 1. 1. Introduction. Object-Oriented Programming
E N D
IFS410Advanced Analysis and Design Week 1 Introduction to Java: Applications 1.1
Introduction • Object-Oriented Programming • OOP is more than learning a new language; it requires a new way of thinking. We must no longer think in terms of data structures - we must think in terms of objects. • Many languages claim to have "Support for Object Technologies!" 1.2
Java • The JavaTM programming language is designed to meet the challenges of application development in the context of heterogeneous, network-wide distributed environments.
Different Kinds of Java • Java Applications • Java Applets • Java Script • Java Server Pages • Java Servlet technology • Java Beans
Object • An object is a software bundle of variables and related methods. • Attribute (State) and Behavior (Method) • Message
Class 06/05/2002 2.7
Class Body • Constructor • Declarations for the Variables • Methods to implement the behavior
Declaring Member Variables • A class's state is represented by its member variables. • You declare a class's member variables in the body of the class.
Understanding Instance and Class Members • By default, unless otherwise specified, a member declared within a class is an instance member. • To specify that a member variable is a class variable, use the static keyword.
JApplet Class • JApplet is a subclass of java.awt.Applet • javax.swing.JApplet • JApplet -- a class that enables applets to use Swing components • init(), start(), paint(), (stop(), destroy()) • Details in Chapter 20
Lab activities (Week 1) • Tutorial 1 (JCreator) –Assignment 1