Below is a mock up of a classic programming function, creating a language filter for pubic
message boards. For each blank line in the code, classify the code directly above it into one of
Measures of effort spent on real-life programs: Comparing programs by time:
Commercial software is seldom written by individuals.
Person-years - equivalent to one person working for twelve months.
Person-months - equivalent to one per
What is a computer?
Performs computations and makes logical decisions
Millions / billions times faster than human beings
Sets of instructions by which a computer processes data
Physical devices of computer system
Learn the Basics of Java Programming
Java is a popular programming language, widely used in industry.
We will learn all the specifics of how to program in Java.
This includes all the peculiar rules that are specific to Java.
We will cover the fundamentals
History of Java
A group of 13 Sun employees including James Gosling started the Green Project in
1991 with the intention of planning for the next wave in computing.
They designed the *7 which was an interactive, handheld home-entertainment device
Select one or more input to the function
Show the program is correct for the simple cases (base case)
Show that if the program is correct for a given case, it is then correct for the next case.
For integers base case is either 0 or
Variables are short-cuts for values, they cannot be assigned more than once
V = 9999*9999
Variable identifiers: is what you type
Store variable: is part of the memory system
The declare statement creates a store variable a
A formal language for describing computation?
A user interface to a computer?
Syntax + semantics?
Compiler, or interpreter, or translator?
A tool to support a programming paradigm?
A programming language is a tool for deve
Compiler is a specific software that gets the whole Source Code (Computer program
written in human understandable form) and translates it into Object Code (Computer
Program that is in machine understandable form) all at a time.
Interpreter is translatin
In object-oriented programming the idea of objects and classes is pushed farther
Classes keep the basic properties of:
Classes are extended with more sophisticated properties:
They have mult
Building a Program
s Whatever type of problem needs to be solved, a careful thought out plan of attack, called
an algorithm, is needed before a computer solution can be determined.
1) Developing the algorithm.
2) Writing the program.
3) Documenting the pr