Tuesday, January 22, 2002 - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

Tuesday, January 22, 2002

Description:

Washburn University. Department of Computer Information Sciences. CM245 C. Schmidt ... John Gosling of Sun Microsystems was the principal designer ... – PowerPoint PPT presentation

Number of Views:25
Avg rating:3.0/5.0
Slides: 13
Provided by: lindaj158
Category:

less

Transcript and Presenter's Notes

Title: Tuesday, January 22, 2002


1
CM245 Lecture 1
CM245 Contemporary Programming Methods
Tuesday, January 22, 2002 Cecil P.
Schmidt Department of Computer Information
Sciences Washburn University Topeka, KS.
66621 zzschmid_at_washburn.edu
2
Presentation Outline
  • Syllabus
  • Introduction to Java
  • Chapter 1 of Bell Parr
  • How to compile a Java program at Washburn
  • Punch and run assignment

3
Introduction 1
  • About the text book
  • How to write Java programs
  • How to run Java programs as free-standing
    programs
  • How to invoke a Java program from a World-Wide
    Web browser
  • Its for beginners
  • Start with visual aspects to elicit interests

4
Introduction 2
  • Why Java
  • Small and beautiful Lean design ultimately
    powerful
  • Its object-oriented from the ground up
  • Supports the internet and networking in general
  • Its general purpose
  • Platform-independent (run anywhere)
  • Robust (protected against viruses)
  • Lots of class libraries http//java.sun.com/produc
    ts/jdk/1.2/docs/index.html
  • History of Java
  • Originally called Oak but had to be renamed
    because there was already a language named Oak
  • John Gosling of Sun Microsystems was the
    principal designer
  • Arose from need to construct software for
    consumer electronics

5
Introduction 3
  • Overview of book
  • Covers fundamentals of programming
  • Variables assignment input and output
    calculations graphics and windows repetition
    selection
  • Classes
  • Objects
  • Methods
  • Using library classes
  • Advanced aspects such as inheritance and
    polymorphism
  • Applets and the World Wide Web
  • Approach is more towards applets but we will be
    doing standalone programs as well so that we can
    improve our debugging capabilities
  • GUIs (Graphical User Interface) components such
    as windows, buttons, scrollbars, and using the
    mouse will be included
  • What version of Java?
  • 1.1 or higher is required
  • java version at the command line will tell you
    what the version is.

6
Chapter 1 The scope of Java
  • How did java come to be?
  • The Internet and the Web
  • Internet the world-wide collection of computers
    connected by a network of communication channels
  • Universal infrastructure
  • Single UI (user interface)
  • Single client - the Web browser
  • Single network protocol - HTTP
  • Single server - web server
  • This Network allows us to communicate
  • Email and web sites
  • Web sites
  • essentially a file on disk that is connected to
    the internet
  • these files can be static or dynamic
  • access to a web site is called a site visit"

7
The World-Wide Web
  • The collection of sites across the world is
    called the"World-Wide Web or WWW
  • Typical sites include (these are called a site
    address)
  • http//www.microsoft.com
  • http//www.washburn.edu
  • URL universal resource locator
  • Browser allows you read and execute web pages
  • Internet Explorer
  • Netscape

8
Hypertext
  • HTML
  • hypertext markup language
  • Used to create web pages which can initiate
    static or dynamic content
  • Example of a web page with dynamic content
  • lthtmlgt ltheadgt
  • lttitlegt Web page with Applet lt/titlegt lt/headgt
  • ltbodygt
  • ltapplet code"Hello.class
  • width300 height200gt lt/appletgt
  • lt/bodygt
  • lt/htmlgt

9
Applets
  • To execute a program with a java applet the
    browser MUST be java enabled (remember!)
  • The java program actually runs local on the
    client
  • Other programs actually run on the web server.
  • Servlets Java programs that execute at the web
    server
  • CGI A program written in any language which runs
    at the server. Typically these are in PERL, PSP,
    C, etc.
  • These do not have to be supported with a Java
    enabled browser.
  • IE 4.0 and Netscape 4.0 (and higher are all Java
    enabled)

10
What is a Program?
  • A program is a list of instructions that can be
    obeyed automatically by a computer which are
    used to complete a task.
  • Program examples include
  • Loan calculations programs
  • Check books
  • Chess
  • Microsoft Word

11
Object Oriented Programming
  • OOP
  • Allows us to represent components of a program as
    interacting objects or modules.
  • Class represents the structure of an object
  • cookie cutter
  • object factory
  • Inheritance a classification scheme
  • Superclass
  • Subclass

12
How to compile a Java program at Washburn?
  • How do I edit a program
  • vi (text based)
  • Nedit (my suggestion)
  • Pico (text based, but easier to learn than vi)
  • What are the steps to compile and run a java
    program?
  • javac ltfilename.javagt
  • java ltfilenamegt
Write a Comment
User Comments (0)
About PowerShow.com