|
wl901-ver2.0
Introduction to Java 2 Programming (5 days)
Description
This courseware training guide book will focus on helping students leverage their existing skills in languages like C or C++ to learn how to develop applications in Java. The details are only for client-based applications and creating standalone applications. The class is designed as a foundation for learning Java technology and mastering the core details of the language.
Suggested PrerequisitesPrior programming experience in one of the following:
1. At least one object-oriented language such as a .NET language (e.g., C#, VB.NET), Java, C++, SmallTalk
2. Or significant programming experience in a modern language such as MS Visual Basic
Next Course
• Intermediate Java 2 Programming
Objectives• Write, compile, and execute Java applications
• Understand flow control constructs
• Understand the details of object-oriented design in Java
• See how to create classes and objects
• Understand how to work with packages
• Understand file input and output with Java
• Investigate multithreaded applications
Course OutlineGetting Started with Java • Introduction • The Java 2 Platform • Sun’s Business Model for Java • The Java 2 Editions • Exercise 1-1: Installing and Setting Up the J2SE • Exercise 1-2: Hello World • The Java Programming Model • The SDK and JRE • Exercise 1-3: Working with the SDK
OO Programming with Java • Introduction • Object Oriented Programming • Writing Java Code • Deciding on Classes and Packages • Comments in Java • Exercise 2-1: Bank Application Starter Code • Starting up the application • The Bank Application Class • Exercise 2-2: Adding an Application Class
Data, Operators and Variables • Introduction • Variables in Java • Literals • Exercise 3-1: Working with Variables • Boolean Data Types • Floating Point Data Types • Character Data • Strings • Exercise 3-2: Working with Data Types • A Possible Solution to The BankApp data types • Operators and Expressions • Arithmetic Operators • Comparison Operators • Logical Operators • Assignment Operators • String Operators • Shift Operators • Operator Presence and Associativity • Exercise 3-3: Operators • Conversion and Casting • Exercise 3-4: Casting and Conversions
Control Structures in Java • Introduction • Statements and Blocks • Local Variables • Exercise 4-1: Statements, Blocks and Local Variables • if statements • The switch statement • The Tertiary Conditional Operator • Exercise 4-2: if and switch Statements • A Possible Solution to Exercise 4-2 • Loops in Java • while loops • Arrays • for loops • The break statement • The continue statement • Exercise 4-3: Loops • Methods • Exercise 4-4: Methods
Objects and Classes • Introduction • Learning Objectives • Creating Objects • Reference Variables • Instance Variables • Instance Methods • Exercise 5-1: Instance Variables and Methods • Constructors and Initialization • Exercise 5-2: Constructors • The Object Life Cycle • Access Modifiers • Class Variables and Methods • Final Variables • Exercise 5-3: Working with static and final • Reference Semantics • Strings and StringBuffer • Arrays • Special Objects – Primitive Data type classes • Exercise 5-4: Arrays and Wrappers
Inheritance in Java • Introduction • Generalization and Inheritance • Inheritance in Java • Protected Access Modifier • Exercise 6-1: Inheritance (this can be done at your convenience) • A Possible Solution to Exercise 6-1 • The Mechanics of Inheritance • Overriding methods • Exercise 6-2: Implementing Inheritance • A Possible Solution to Exercise 6-2 • Interfaces • Exercise 6-3: Marker Interfaces
Class Design • Introduction • Learning Objectives • Enforcing Encapsulation • Exercise 7-1: Encapsulation • Cohesion and Coupling • Delegation and Inheritance • Exercise 7-2: Delegation
Java Packages • Introduction • Packages in Java • Defining Java Packages • Using Java Packages • Storing and Finding Java Packages • Exercise 8-1: Packages (finished solutions in Exercises\Mod08\Exercise8-1\) • Package Access • Package Facades • Exercise 8-2: Package Access and Facades (this can be done later at your convenience)
Exceptions • Introduction • Exceptions • Classification of Exceptions in Java • Try-Catch • Exercise 9-1: Working with Exceptions • Exercise 9-2: Exception Hierarchy • Declaring thrown exceptions on functions • Exercise 9-3: Throwing Exceptions • The finally block and re-throwing exceptions • Exercise 9-4: Rethrowing Exceptions
Java IO • Introduction • Basics of Java I/O • The Top Level interfaces • Implementation Classes • Filter Streams and the Decorator Pattern • Filter Classes • Some Examples • Exercise 10-1: Input and Output • Object Serialization • The File Class • Exercise 10-2: Serialization
Java Collections • Introduction • Collections and Frameworks • The Collection Interface • The Set Interface • The List Interface • The Map Interface • Algorithms • Wrappers • Exercise 11-1: Collections
Optional A: Multi-Threading • Introduction • Concurrency • Writing a Thread • Thread Priorities • Exercise 12-1: Threads • The Runnable Interface • Synchronization of Shared Resources • Thread Cooperation • Exercise 12-2: Threads
Optional B: Java Networking • Introduction • Networking in Java • Socket Classes in Java • Multi-threaded Servers • Working with URLs • Exercise 13-1: Sockets and URLs
|
|
|
|