- Forward


Programs in an Object-Oriented Language
An Introduction


Prof. David Bernstein
James Madison University

Computer Science Department
bernstdh@jmu.edu

Print

Review
Back SMYC Forward
  • The Practice:
    • We have been using an object-oriented programming language
    • Our "programs" have consisted of a main class and one or more supporting classes
  • The Theory:
    • We've used a casual definition of the term "program"
    • We've avoided defining the term "object"
Moving Forward
Back SMYC Forward
  • The Theory:
    • We need to define the term "object" (and the term "class")
    • We need to have a more formal definition of the term "program"
  • The Practice:
    • We need to be able to write classes (and use objects that are instances of those classes)
Programs in an Object-Oriented Language
Back SMYC Forward
  • The Structure of Object-Oriented Code:
    • A group of cooperating classes with a well-defined entry point
  • Object-Oriented Programs When Running:
    • A group of cooperating objects (some, but not all, of which are created in the entry-point)
    • An optional group of utility classes that the objects use for performing calculations of various kinds
  • Kinds of Java Programs:
    • Applications - the entry point is the main() method in the main class
    • Applets - the entry point is the init() method in the Applet
There's Always More to Learn
Back -