I have put some of this sections material into my Chapter 2 notes since I think it fits there better.
Algorithms are the "recipes" ... the sequence of
steps to achieve the desired goal.
All algorithms are made up of: One reason that Java was so cool was that it was platform-independent (discuss byte code again)
slide 57-58
No matter what tools we have to help us, we still need to make sure that what we write is understandable by the compiler so it can translate it.
Programs are written in languages that have synax and semantics (like any other language)
Programs often have errors - three different kinds!. slide 61
Operating Systems are the programs that "operate" the machine - tell it what to do.
This is actually very cool. slide 9
ls -F
For more see the UNIX part of the machines and java notes > in Getting Started
Whenever you have problems with code and want to ask anyone
for help (whether it be lab assistant, TA, instructor, local UNIX
guru, local Java guru, friend, etc.) you should always send a copy
of your error message with your request for help. To just say
it "doesn't work" does not help us to help you. (1) Tell us
what you did and (2) Give us the
compiler or run-time error so we have some clue of the problem
You need an HTML file with the applet tag to put your
java applet on the web. See Lab1
for your first example... you used index.html or lab1.html to put the applet tag
Classes an abstract grouping of objects of the same type
Instances a specific individual object of a class (new)
Inheritance allows code reuse (a wonderful thing)
imports
Here is a copy of The
Java API
and an API users guide and also the Tool Reference page will be most helpful
OK, you fill in what each line is all about...
What should this file be called? (also see the Swing Version )
What else do I need to do after writing it?
Program Development
slide 54-55
Programs are sequences of instructions - they can be large or small
When we write these we call it source code and it is (hopefully) readable by others.
The machine takes our source code and puts it into a form that it can understand. How? slide 56
Integrated Development Environments
Some people like to use tools to help them organize their programs: slide 59
Learning a Language
And we need to make sure that we write what we mean slide 60 Operating Systems
The programs need to run on something - and something has to tell the machine what it is supposed to do when.
Good idea to get used to using a UNIX machine
and not only via telnet...
(what is telnet anyway?)
Files
careful with slashes:
forward (/)on Unix
backward (\)on Microsoft
to distinguish between files and directories(folders) in UNIX
Editors
See also the UNIX Editors in Getting Started
Basic Program Development: Software Principles
slide 64 Problem Solving
THEN repeat until works (i.e, DEBUGGING )
slide 62 (software models: waterfall vs fountain)
On the Web?
Course Focus: Object-Oriented Programming (OOP)
slide 65-71
Objects
Again...remember to look at slide 65-71
Libraries
allow run-time linking to needed classes
Running the program
Run application (from command line ) by calling (notice no extension)
java filename
OR applet using Appletviewer (notice in tools page) or browsers
appletviewer http://www.pagetutor.com/idiot/idiot.html
is a cute one to try, or your own (in both, notice use of extension .html)
appletviewer http://www.ecst.csuchico.edu/~yourname/HelloWorld.html
Demystifying the program
Consider a program like your lab 1. The line numbers are there so
I can discuss the lines, they would not be in your code.
Hint on number 5: Question in class, "What is 50,50 for?"
50 pixels from left of screen and 50 pixels from top (x,y position)
here it is (note how to look at its source from the web page)
A copy of the text author's slides used in the lecture.