JavaHowtoProgram,8/e
Inheritance
A form of software reuse in which a new class is created by
absorbing an existing classs members and embellishing them
with new or modified capabilities.
Can save ti
JavaHowtoProgram,8/e
Covered in this chapter
Classes
Objects
Methods
Parameters
double primitive type
Analogy to help you understand classes and their
contents.
Suppose you want to drive a car and ma
JavaHowtoProgram,8/e
Java application programming
Use tools from the JDK to compile and run programs.
Videos at www.deitel.com/books/jhtp8/
Help you get started with Eclipse and NetBeans integrated
Disjoint Sets Data Structures
Disjoint
& Minimum Spanning Trees
Minimum
Contents:
Growing a Minimum Spanning Tree
Prims Algorithm
Data Structures for Disjoint Sets
Kruskals Algorithm
NCKU IIM
NCK
Red-Black Trees
Contents:
Properties of red-black trees
Rotations
Insertion
Deletion
NCKU IIM
Chapter 13
2
Overview
A variation of binary search trees with one extra bit of
storage per node: it
Binary Search Trees
Contents:
What is a binary search tree?
Querying a binary search tree
Insertion and deletion
Randomly built binary search trees (*)
NCKU IIM
Chapter 12
2
Search Trees
Data s
Elementary Data Structures
Contents:
Stacks & Queues
Linked Lists
Implementing Pointers and Objects
Representing Rooted Trees
NCKU IIM
Chapter 10
2
Data Structure
A data structure is a way to st
Medians and Order Statistics
Contents:
Minimum and Maximum
Selection in Expected Linear Time
Selection in Worst-Case Linear Time
NCKU IIM
NCKU
Chapter 9
2
Overview
ith order statistic is the ith
Sorting in Linear Time
Contents:
Lower bounds for sorting
Counting sort
Radix sort
Bucket sort
NCKU IIM
NCKU
Chapter 8
2
Overview
How fast can we sort?
We will prove a lower bound (nlgn) , the
Heapsort
Contents:
Heaps
Maintaining the heap property
Building a heap
Heapsort algorithm
Priority queues
NCKU IIM
NCKU
Chapter 6
2
Heap Data Structure
Heap A is a nearly complete binary tree.
Randomized Algorithm
Contents:
the hiring problem
indicator random variables
randomized algorithms
NCKU IIM
NCKU
Chapter 5
2
The Hiring Problem
Scenario:
You are using an employment agency to hir
Recurrences
Contents:
The substitution method
The recursion-tree method
The master method
NCKU IIM
NCKU
Chapter 4
2
What is a recurrence?
A recurrence is an equality or inequality that
describes
Growth of Functions
Contents:
asymptotic notation
standard notation and common functions
NCKU IIM
NCKU
Chapter 3
2
Asymptotic Notation
(g(n) = cfw_ f(n): there exist positive constants c1, c2,
and
We will first introduce foundations of data structures such as the linked lists, stacks, queues, trees, heaps,...etc. Fundamental issues about algorithms, such as how to measure algorithmic efficiency
JavaHowtoProgram,8/e
Polymorphism
Enables you to program in the general rather than program
in the specific.
Polymorphism enables you to write programs that process
objects that share the same super
JavaHowtoProgram,8/e
Deeper look at building classes, controlling access to
members of a class and creating constructors.
Compositiona capability that allows a class to have
references to objects of
JavaHowtoProgram,8/e
Data structures
Collections of related data items.
Discussed in depth in Chapters 2022.
Arrays
Data structures consisting of related data items of the same type.
Make it conve
JavaHowtoProgram,8/e
Best way to develop and maintain a large program is to
construct it from small, simple pieces, or modules.
divide and conquer.
Topics in this chapter
static methods
Declare a met