Académique Documents
Professionnel Documents
Culture Documents
Programs
Programming
What is programming?
Creation of order
Planning or scheduling the performance
of a task
Information
Data
information in a form the computer can use
comes in different forms : letters, words,
integer numbers, real numbers, dates, times,
coordinates on a map etc.
Each type of data is said to have a specific data
type
Computer program
How do we write a
Program?
PROBLEM-SOLVING PHASE
IMPLEMENTATION PHASE
Analysis and
specification
General solution
Concrete solution
(program)
(algorithm)
Test
verify
Maintenance phase
Programming Language
Too complicated
Too ambiguous
Other terms
Coding
Running code
Execution of code
Debugging
Implementation
Differences in
implementation
Johns Java code
PROBLEM
Algorithm
Peters Java code
Marys Java code
Simons Java code
Machine language
Assembly language
Low-level programming language in which a
mnemonic is used to represent each of the machine
language instructions for a particular computer
Assembly Language Machine Language
ADD 100101
SUB 010011
Assembly language
High-level languages
HUMAN
THOUGHT
ALGORITHMS
PSEUDOCODE
JAVA
NATURAL LANGUAGE
HIGH LEVEL
PROGRAMMING LANGUAGE
pro
ble
m
COMPILER
MACHINE CODE
Converting a high-level
language to machine
language
Compiler
Source code
Object code
Bytecode
Windows PC
Running JVM
Java program
Java
Compiler
Java
Bytecode
UNIX Workstation
Running JVM
Macintiosh
Running JVM
Java compiler produces Bytecode that can be run on any machine with the JVM
Program
running
Java
JVM
Bytecode Running on X
INTERPRETATION
Machine
Language for
machine X
Type of instructions
Sequence
Statement
Selection
Statement
True
Statement
Statement1
Condition
False
Statement2
Selection
False
Condition
True
Statement1
Subprogram/Method/Function
STATEMENT1
SUBPROGRAM1
STATEMENT2
SUBPROGRAM1
A meaningful collection of
any of the other control
statements
Asynchronous Control
(Asynchronous not at the same time, events can occur at any time)
EVENT
EVENTHANDLER
A subprogram executed
when an event occurs
Object-Oriented
Programming Languages
Object-Oriented
Programming Languages
Object-oriented
terminology
Class
A description of an object that specifies
the types of data values that it can hold
and the operations that it can perform
Instantiate
To create an object based on the
description supplied by a class