Skip to Secondary Navigation | Skip To Content

Java 6 Programming: A Crash Course

Dates:
May 3-7, 2010

Time:
TBD

Instructor:
Marty Hall

Location:
Dorsey Center, Elkridge, MD

Tuition:
The 5-day course costs $2395 per student and includes an extensive course notebook, a commercial Java textbook, exercises, exercise solutions, breakfast, snacks, and lunch.

How to Register:
Submit Registration Form PDF version link opens an adobe pdf file (286 KB) by fax at 410.579.8049, email a scanned copy, or by USPS mail. If you register for more than one non-credit course during the Spring 2010 semester or send more than one student from the same organization, enter "Multiple" as the discount code on the registration form PDF version link opens an adobe pdf file (286 KB) and subtract $200 per person per course. Bonus: Register at least two weeks in advance and receive a $50 gift certificate from amazon.com.

Course Description

Java is the world's most popular and widely-applied programming language, but it is large, complex, and sometimes difficult to get started with. This course gives a practical, hands-on introduction to programming with Java 6, the latest version of the language. It provides thorough coverage of the foundational Java topics: basic syntax, object-oriented programming, and core data structures; it also gives a fast-moving survey of some of the most important libraries: graphical user interfaces, multithreaded applications, network programming, serialization, and XML parsing. In each section, it gives details on the most important topics, surveys more advanced or lesser-used topics, stresses best practices, and gives plenty of working examples.

Prerequisites

The course consists of an approximately equal mixture of lecture and hands-on lab time. The course assumes that all students are experienced programmers in some language: this is not a course for first-time programmers. Experience with C, C++, C#, or Objective-C is particularly helpful.

Syllabus

Introduction to and Overview of Java
  • Truths / Myths About Java
    • Java is Web-Enabled?
    • Java is Safe?
    • Java is Cross-Platform?
    • Java is Simple?
    • Java is Powerful?
  • Common Java Protocols and Packages
  • Getting Started
    • Applications
    • Applets
Basic Java Syntax
  • Creating, compiling, and executing simple Java programs
  • Accessing arrays
  • Looping
  • Indenting code
  • Using if statements
  • Comparing strings
  • Building arrays
    • One-step process
    • Two-step process
    • Multidimensional Arrays
  • Performing basic mathematical operations
  • Reading command-line input
Basic Object-Oriented Programming in Java
  • Similarities and differences between Java and C++
  • Object-oriented nomenclature and conventions
  • Instance variables (data members, fields)
  • Methods (member functions)
  • Constructors
  • Destructors (not!)
Object-Oriented Programming in Java: More Capabilities
  • Overloading
  • Designing "real" classes
  • Inheritance
  • Quick intro to advanced topics
    • Abstract Classes
    • Interfaces
    • Understanding Ploymorphism
    • Setting CLASSPATH and using packages
    • Visibility Modifiers
    • Creating on-line documentation using JavaDoc
Applets and Basic Graphics
  • Applet restrictions
  • Basic applet and HTML template
  • The applet life-cycle
  • Customizing applets through HTML parameters
  • Methods available for graphical operations
  • Using try/catch blocks
  • Loading and drawing images
  • Controlling image loading
More Java Syntax and Utilities
  • Mutating vs. Returning Results
  • Data Structures
    • ArrayList
    • LinkedList
    • HashMap
  • Generics
  • printf
  • varargs
  • String vs. StringBuilder
Asynchronous Event Handling
  • Applet restrictions
  • Basic applet and HTML template
  • The applet life-cycle
  • Customizing applets through HTML parameters
  • Methods available for graphical operations
  • Using try/catch blocks
  • Loading and drawing images
AWT Components
  • Basic AWT windows
  • Creating Lightweight Components
  • Closing Frames
  • Using Object serialization to save components to disk
  • Basic AWT user interface controls
  • Processing events in GUI controls
Organizing Windows with Layout Managers
  • How layout managers simplify interface design
  • Standard layout managers
  • Positioning components manually
  • Strategies for using layout managers effectively
Drawing with Java 2D
  • Drawing Shapes
  • Paint Styles
  • Transparency
  • Using Local Fonts
  • Stroke Styles
  • Coordination Transformations
  • Requesting Drawing Accuracy
GUIs: Basic Swing
  • New Features
  • Basic approach
  • Starting points
    • JApplet, JFrame
  • Swing equivalent of AWT components
    • JLabel, JButton, JPanel, JSlider
  • New Swing components
    • JColorChooser, JInternalFrame, JOptionPane, JToolBar, JEditorPane
  • Other simple components
    • JCheckBox, JRadioButton, JTextField, JTextArea, JFileChooser
GUIs: Advanced Swing and MVC
  • Building a simple static JList
  • Adding and removing entries from a JList at runtime
  • Making a custom data model
  • Making a custom cell renderer
Multithreaded Programming
  • Why threads?
  • Basic approach
    • Make a task list with Executors.newFixedThreadPool
    • Add tasks to the list with tasks.execute
  • Two variations on the theme
    • Separate instances of Runnable
    • One instance of Runnable
  • Race conditions and synchronization
  • Helpful Thread-related methods
  • Advanced topics in concurrency
Multithreaded Graphics and Animation
  • Approaches for multithreaded graphics
    • Redraw everything in paint
    • Have routines other than paint draw directly on window
    • Override update and have paint do incremental updating
    • Double buffering
  • Reducing flicker in animations
  • Implementing double buffering
  • Animating images
  • Controlling timers
Network Programming: Clients
  • Creating sockets
  • Implementing a generic network client
  • Parsing data
    • StringTokenizer
    • String.split and regular expressions
  • Retrieving files from an HTTP server
  • Retrieving Web documents by using the URL class
Network Programming: Servers
  • Steps for creating a server
  • A generic network server
  • Accepting connections from browsers
  • Creating an HTTP server
  • Adding multithreading to an HTTP server
Network Programming: Using Serialization to Send High-Level Data Structures
  • Idea
  • Requirements
  • Steps for sending data
  • Steps for receiving data
XML Parsing and DOM
  • Options for input files
  • XML overview
    • Comparing XML with HTML
  • Parsing an XML document
    • Creating a DocumentFactory and Document
  • Extracting data from parsed document
    • Known structure, attribute values only
    • Known structure, attribute values and body content
    • Unknown structure

Schedule: Spring 2010 Course Schedule by Program: Online Course Offerings: Graduate Information: