Module 1 - Chapter 3 Introduction To Object-Oriented Concepts & Java
Module 1 - Chapter 3 Introduction To Object-Oriented Concepts & Java
Class
Is a blueprint or template of an object?
It represents broad groups of objects
It contains elements common to a group of objects
Example:
- Animal
- Vehicle
Object
Is an instance of a class?
It is a specific occurrence of a class
Objects have state and behavior
Example:
- Cat is an instance of the class Animal
- Car is an instance of the class Vehicle
A cat has several states: asleep, alive, lost
Its behavior could be: eating, jumping, etc.
Inheritance
Ability to “inherit”, use or modify existing or predefined classes
Polymorphism
The ability of objects to respond or behave
differently
Example: A cat “purrs”, a dog “barks”, and a cow “moos”
What is Java?
Is an object-oriented programming language.
Is both a programming language and a platform.
Java is hardware-independent and can run on various operating systems
As a programming language, it
- Contains specifications for writing or coding programs
- Has a compiler for checking syntax and converting programs to bytecodes
- Has a rich set of APIs (Application Programming Interfaces) that can be
reused and modified?
As a platform, it
- Converts bytecodes into executable code
- Has a JVM (Java Virtual Machine) to run java programs on various
operating systems
History of Java
Java
Was created in 1991 by James Gosling, et al. of Sun Microsystems
It was originally designed for consumer electronic devices and was called Oak
With the advent of the Internet, Sun developed a browser named HotJava using Oak
In 1994, Sun renamed Oak to Java and released a free alpha version of the JDK
(Java Developer’s Kit) composed of Java and HotJava
In 1996, Netscape Communications Corp announced support for Java applets which
was later included in version 2.0 of the Navigator browser
Development Tools
- Compiler, launcher and documentation tools are in the JDK
Deployment Technologies
- Contains software for deploying applications to end users
User Interface Tookits
- Swing and Java2D tookits are available for creating Graphical User
Interfaces (GUIs)
Integration Libraries
- A suite of libraries for connecting to databases and manipulating remote
objects
Object-oriented
Distributed
Interpreted
Robust
Secure
Architecture Neutral
Portable
High Performance
Multi-threaded
Dynamic