
CMSC433, Spring 2004
Programming Language Technologies and
Paradigms
http://www.cs.umd.edu/class/spring2004/cmsc433
Jeff Foster
January 29, 2004
2
Course Goal
To make you a better programmer
•Deconstruct relevant programming problems
•Solve them in an object-oriented style, focusing on
–Reusability
–Maintainability (clarity)
–Design
3
Approach
•Will use the Java programming language exclusively
–But the ideas apply to other languages equally well
•Sequential object-oriented (OO) programming
–Basic principles and tools, and
–Design patterns to improve reusability and reliability
•Concurrent OO programming
–Shared-memory multi-threading (Java Thread class), and
–Distributed message passing (Java Remote Method Invocation)
4
The Need for Abstraction
found = false;
for (int i = 0; i < a.length; i++)
if (a[i] == e) {
z = i;
found = true;
}
found = false;
for (int i = a.length-1; i >= 0; i--)
if (a[i] == e) {
z = i;
found = true;
}
Fragment 1:
Fragment 2:
5
Abstraction
•A better abstraction may be
•Improves
–Reusability
–Maintainability
•Abstraction is the key to good design
found = a.isIn(e);
if (found)
z = a.indexOf(e);
6
Topics
•Java review (2-3 lectures)
•Programming techniques and tools
–Specifications and testing
•Design patterns
•Refactoring
•Concurrency
–Concurrent programming in Java
–Design patterns
– Distributed programming
•To be determined
–Possibilities include security, event-based programming,
reflection, memory management, ...?