Overview Package Class Use Tree Deprecated Index Help
PREV CLASS NEXT CLASS
SUMMARY: NESTED | FIELD | CONSTR | METHOD
Standard Ed. 6
All Classes All Classes
DETAIL: FIELD | CONSTR | METHOD
LeetCode Premium Subscription
How big is the program?
How close are you to finishing?
We are almost there!
Can you, as a manager, make any useful
decisions from such subjective information?
Need information like, cost, effort, size of
The gang of four (GoF)
Design Patterns book catalogs 23 different patterns
Solutions to different classes of problems, in C+ & Smalltalk
Problems and solutions are broadly applicable, used by
many people over many years
Measuring on class level
Measuring on package / higher level
Metrics for the Object Oriented
Chidamber & Kemerer 94
Metrics specifically designed to address
Domain Model Design Model
Assign responsibilities to classes
October 8, 2004
Interaction Diagrams are models that describe how
groups of objects collaborate in some behavior.
Observer Pattern 
Need to separate presentational aspects with the data,
i.e. separate views and data.
Classes defining application data and presentation can
Change in one view automatically reflected in other
The COMMAND Pattern
You want to implement commands that behave like objects
(i) because you need to store additional information with
(ii) because you want to collect commands
1. Define a command interface type w
To learn notations for representing a design.
To understand and be able to apply the basic
principles of software design.
To learn techniques and tools for ObjectOriented Design.
Introduction to Java
Present the syntax of Java
Introduce the Java API
Demonstrate how to build
stand-alone Java programs
Java applets, which run within browsers e.g.
Its the current hot langu
Yo ur Firs t Java
Applic atio n
Pro g ram Co nc e pts
Modern object-oriented programs
help us build models to manage the
complexity found in a problem
The problem domain describes real-world
objects and concepts that a computer
File s , File Pars ing ,
a nd S tring s
Abo ut S tring s
String is a class, not
an intrinsic type.
followed by a
strings to affect the
Wo rking with S tring s
A & AB
and Data Structures
Maria Litvin Gary Litvin
Copyright 2006 by Maria Litvin, Gary Litvin, and Skylight Publishing. All rights reserved .
Learn about literal strings
S pe c ializatio n and
Inhe ritanc e
S pe c ializatio n
Specialized classes inherit the
properties and methods of the
parent or base class.
A dog is a mammal
A car is a vehicle
A Button is a Cont
Constructors are special methods that are used to initialize an
object. A constructor can do anything a normal
method can, but usually is used simply to initialize
variables within the object to some starting value.
Constructors do not have an
Basics of Java
ACEP/ Sun Java 2/ Session 2/ 1 of 24
Discuss the various data types available in
Java and utilize them in applications
Explain and utilize the various operators
present in Java
Describe the various control struc
Instructor: Andrew Siegel
Who is this class for?
There is no assumption that you know any
Java or other OO programming language. If
you do, you may find the first few weeks
You must have programming experience.
P ro g ram S truc ture s
Allows different code to execute based
on a conditional test.
if, if-else, and switch statements
If, Else, and Else-If
If the sky is blue, Ill ride my bike.
If the sky is red,
Intro duc tio n to Arrays
What is an array?
An array is an ordered collection that
stores many elements of the same
type within one variable name.
Elements are the items in an array.
Each element is identified with an index
Two -Dime ns io nal
What is a two -dime ns io nal array?
array has rows
and can be thought
of as a series of
arrays stacked on
top of one another.
De c laring a Two -Dime ns io nal Arr
What is Database?
is an collection of data know as table.
The primary objective of a database is to
provide a convenient way to retrieve and store
information in the database.
Table is a combination of rows and columns.
Only print() and println() is used.
Application based on graphical oriented.
Streams:Perform I/o through streams
Stream which is used to produces or consumes
Two types of streams InputStream/OutputStreams
Layout manager automatically arranges
our controls with in a window by using
some type of algorthims.
Each container object has a layout
It is an instance of any class that
implement layout manager interface.
It is set by setLa
Using a Comparator
Both TreeSet and TreeMap store elements in stored order.
The elements can be stored in natural ordering.
[A before B,1 before 2 and so forth]
For to compare in different order we can use the methods
of Comparator interface.
The Collection Classes
The Following table shows Collection Class
Implements most of the Collection Interfaces
Extends AbstractCollection and Implements most of the