Core Java SE 6 for OO and non OO experienced

Page 1

Course information

Core Java SE 6 for OO and non OO experienced

JAVASE-01.00

Duration: 4,5 - 5 days Course Description This course is for people that have no OO background and people that have a OO background. The people that have a OO background will start after lunch, but are welcome to attend the first morning. This fast paced, comprehensive hands-on workshop is geared for developers who have had prior programming experience, but little or no prior exposure to object-oriented programming languages. This workshop provides and extensive overview of Object -Oriented technologies and their relation to Java. This is not an "exposure" class - we ensure that you will leave ready to program intermediate-level, Java applications using object-oriented programs in Java, using sound development techniques. This workshop has successfully provided COBOL, C and mainframe developers as well as C++ and other OO developers the skills needed to program Java.

Course Objectives Students who attend this course will leave the course armed with the skills they require to develop solid object-oriented applications written in Java, using sound coding techniques and best coding practices. Working in a hands-on environment, developers will: • • • • • • • •

Understand not only the fundamentals of the Java language (using Java SE 6), but also its importance, uses, strengths and weaknesses Understand the basics of the Java language and how it relates to OO programming and the Object Model Learn to use Java multi-threading and exception handling features Understand and use classes, inheritance and polymorphism Develop GUI applications using AWT and Swing Use the JDBC API for database access

This five-day workshop is comprised of carefully integrated lessons and hands-on lab exercises. Each lesson in this Developer’s Workshop is driven by performance-based objectives specific to the critical skills you are learning in this training – no more, no less. Please review these objectives prior to the start of each lesson. You will be asked to assess your understanding of those objectives at the end of each lesson to ensure you have mastered the concepts introduced in that chapter. The training is comprised of approximately 45% hands-on lab and 55% lecture. Many complete “mini-projects” are laced throughout the course, designed to reinforce fundamental skills and concepts learned in the lessons. Because these lessons, labs and projects are presented in a building block fashion, students will gain a solid understanding of not only the core concepts, but also of how all pieces fit together in a complete application. 1 | Core Java SE 6 for OO and non OO experienced ©2010 IT Education


Course information

Core Java SE 6 for OO and non OO experienced

JAVASE-01.00

At the end of each lesson, each developer will be tested with a set of review questions to ensure that he/she has fully understood the topic.

Who can benefit? Developers needing to become productive in Java immediately (J2SDK 1.4, Java SE 1.5 and Java SE 6). Programmers who want to learn Java and Object Oriented Programming. Technical managers who need a thorough understanding of Java Ideally students should have a minimum of six months' experience with a procedural language, such as C.

2 | Core Java SE 6 for OO and non OO experienced Š2010 IT Education


Course information

Core Java SE 6 for OO and non OO experienced

JAVASE-01.00

Workshop overview Object Oriented Concepts in Java™(rev:4956) Conventional vs. Object Oriented Programming • • • •

List the two features contained within an object. Name the OO component that provides the blueprint for creating object instances. Name the OO component that provides behaviors to an object. Name the term used to expose the capabilities of an object

Inheritance, Abstraction, and Polymorphism • • • •

Provide one benefit of encapsulation. Name an example of where inheritance cannot be used in place of aggregation, and provide one clear example showing this to fail. List two reasons for using inheritance. Give one example of a benefit of using polymorphism.

Getting started with Java™(rev:4895) The Java Platform • • • • •

Understand what Java is Understand the role of the JVM Understand the development steps Which Tools to use Understand how to setup your (development) environment

Using the JDK • • •

Use the command line compiler to compile a Java class. Use the command line Java interpreter to run a Java application class. Correctly set up the CLASSPATH environment variable to allow the compiler and interpreter to run correctly.

3 | Core Java SE 6 for OO and non OO experienced ©2010 IT Education


Course information

Core Java SE 6 for OO and non OO experienced

JAVASE-01.00

Getting Started with the Java™ Language(rev:4896) Writing a Simple Class • • •

Write a class that does not explicitly extend another class. Define instance fields for a class. Implement a main method to create an instance of the defined class.

Adding Methods to the Class • • • • •

Write a class with accessor methods to read and write private instance fields. Write a constructor to initialize an instance with data. Write a constructor that calls other constructors of the class to benefit from code reuse. Use the this keyword to distinguish local variables from instance fields. Explain variable arguments (varargs)

Language Statements • • • • • • • •

List the Java keywords List the four arithmetic operators. List the three operators to increment and decrement numbers. List the six comparison operators. List the two logical operators. Name the return type of the comparison and logical operators. Use one of the increment operators to increment an integer. Write a for loop that can iterate a specified number of times.

Using Strings • • • • •

Create an instance of the String class. Test if two String objects are equal. Test if two String objects are the same object. Get the length of a String object. Parse a String object for its token components.

• • • • •

Perform a case-insensitive equality test. Build up a String object using a StringBuffer object. Build up a String object using a StringBuilder object. Understand the difference between the StringBuffer and StringBuilder Convert between String and StringBuffer/StringBuilder.

4 | Core Java SE 6 for OO and non OO experienced ©2010 IT Education


Course information

Core Java SE 6 for OO and non OO experienced

JAVASE-01.00 • • • •

Explain the java.util.Formatter class Explain format specifiers, using printf Use printf and String.format to format numbers and dates Explain the Formattable interface

Utility Classes • • • • •

Convert String representations of primitive numbers into their corresponding wrapper. Convert String representations of primitive numbers into their primitive types. Appreciate auto unboxing a wrapper to its primitive type Use the Date class to get the current time and date. Use the Date class to determine if one Date is earlier or later than another.

Using Arrays • • • •

Declare an array reference. Allocate an array. Initialize the entries in an array. Appreciate the extended for-loop for iterating over an array

Essential Java™ Programming(rev:4897) Java™ Packages • • • • •

Use the package keyword to define a class within a specific package. Explain the effects of the four levels of accessibility. Use the import keyword to declare references to classes in a specific package. Use the standard type naming conventions when creating packages, classes, and methods. Correctly execute a Java application class that is defined in a package.

Fields and Variables • • • • • •

Initialize instance fields to default values. Distinguish between instance fields and method variables within a method. Initialize method variables prior to use. Explain the difference between the terms field and variable. List the default values for instance fields of type String, int, double, and boolean. Name the keyword used to create constants in Java.

5 | Core Java SE 6 for OO and non OO experienced ©2010 IT Education


Course information

Core Java SE 6 for OO and non OO experienced

JAVASE-01.00

Enums, Static Methods and Fields • • • • • • • •

Create static fields in a class. Explain one use of static fields. Create static methods in a class. Explain one benefit of static fields. Understand the concept of a static import Appreciate enums Explain how to define your own enumerations Explain the syntax used to reference static fields and methods.

Exceptions(rev:4898) Handling Exceptions • • • • •

Define a try/catch block that allows methods that throw exceptions to be called. Correctly implement try/catch blocks for methods which throw multiple exceptions. Name the exception supertype which is not checked for by the compiler. Correctly implement a method which throws exceptions. Correctly override a method which throws exceptions.

Throwing and Developing Exceptions • • •

Understand how How to throw exceptions. Define your own application exceptions. Introduce the assert keyword

Advanced OO Programming(rev:4899) Specializing in a Subclass • • • • • •

Construct a class that extends another class. Correctly implement equals and toString. Write constructors that pass initialization data to the parent constructor as appropriate. Use instanceof to verify the class type of an object reference. Override subclass methods and use the super keyword to leverage behaviors in the parent. Safely cast references to a more refined type.

6 | Core Java SE 6 for OO and non OO experienced ©2010 IT Education


Course information

Core Java SE 6 for OO and non OO experienced

JAVASE-01.00

Inheritance and Polymorphism • • • • •

Write a subclass with a method that overrides a method in the superclass. Group objects by their common supertype. Utilize polymorphism by correctly invoking subclass method implementations through superclass references. Safely cast a supertype reference to a valid subtype reference. Use the final keyword on methods and classes to prevent overriding through subclassing.

Interfaces and Abstract Classes • • • • • •

Define supertype contracts using interfaces. Define supertype contracts using abstract classes. Implement concrete classes using interfaces. Implement concrete classes using abstract classes. Explain one advantage of interfaces over abstract classes. Explain one advantage of abstract classes over interfaces.

Generics • • • • •

Understand what generics are Understand how te create generic classes Understand how te create generic methods Understand generic wildcards Understand how to use generics

Collections(rev:4900) Collections • • • • • • • • • •

Understand the different types of collections in the Java SE Understand the difference between collection interfaces and collection implementations For each collection type, understand it's usage. Use ArrayList to maintain a list of data elements. Use Iterator to search elements of a collection. Use methods of List to access sublists. Appreciate the extended for-loop for iterating over a collections Appreciate how generics ease the development of (type-safe) collection Sort and shuffle elements in a list. Create read-only collections from standard.

7 | Core Java SE 6 for OO and non OO experienced ©2010 IT Education


Course information

Core Java SE 6 for OO and non OO experienced

JAVASE-01.00 • • • • •

Understand the Comparable interface Understand the proper use of the hashCode and equals methods within the Set Write a Comparator to provide custom sorting. Become familiar with Queue implementations Introduce the EnumSet and EnumMap

Threading in Java(rev:4901) Developing Threads in Java • • • • • • •

Create threaded class using both Thread, Runnable and Callable Start and manage threads/tasks using the Executor framework Appreciate Future Use and configure thread pools Use thread synchronization to guarantee data integrity in a multithreaded application Use object synchronization to allow multiple threads to work cooperatively on a shared set of data Use the Lock API

Coding Standards(rev:4958) JavaDoc • • •

Understand how to document your code Understand the different JavaDoc tags create HTML-based Java API documentation

Jar-files • • •

Introduce the different types of jar-files Create a jar-file Create a Jar-packed application

More OO(rev:4902) JavaBeans • • • •

Understand what JavaBeans are Understand how JavaBeans are used Understand JavaBean features List tools and frameworks that rely on the JavaBean specification

8 | Core Java SE 6 for OO and non OO experienced ©2010 IT Education


Course information

Core Java SE 6 for OO and non OO experienced

JAVASE-01.00 • •

Introduce reflection and introspection Understand BeanInfo (and the default BeanInfo)

• • •

Understand JavaBeans properties Understand how to write JavaBeans event sources and listeners Understand the different JavaBeans design patterns

Inner classes • • • •

Explain inner classes (static, non-static, local (method) and anonymous) Explain the allowed usages of modifiers Briefly explain the strictfp and volatile modifiers Understand the restrictions of Local Inner classes

Java Annotations • • • • • • • • •

Explain Metadata in Java SE 5 Be able to develop custom annotations Introduce annotation elements (properties) Declare default values for annotation elements Show how annotations can be used at runtime Explain package-wide annotations and the package-info.java file Introduce the three standard compiler annotations Explain the Deprecated, Override and SuppressWarnings annotation Provides examples of the usage of annotations by other frameworks

Graphical User Interfaces(rev:4904) Containers and Layout Managers • • • • • • • •

Create a window frame. Nest panels within a frame for better layout control. Create and display buttons in a panel. List two component attributes that are controlled by a layout manager. Set the layout manager for a container. Place components in a panel using BorderLayout, GridLayout, and FlowLayout. Name one advantage of each of the layout managers. Create panels with titles.

9 | Core Java SE 6 for OO and non OO experienced ©2010 IT Education


Course information

Core Java SE 6 for OO and non OO experienced

JAVASE-01.00

Essential graphical components • • • • • • •

Place text fields, text areas, and buttons in a graphical application Handle action events from a button. Write code within an event handler to manipulate the content of text fields and text areas. Place check boxes, radio buttons, and combo boxes in a graphical application. Create a combo box consisting of a list of string elements. Create radio buttons in a radio button group. Create a menu for a frame containing menu items, sub-menus, check boxes, and radio buttons.

Advanced Layout • • • •

Use GridBagLayout to create forms with properly aligning and resizing labels, text fields, and text areas. Provide scroll bars for components. Add multiple components to a container, separated by splitter bars. Create tabbed panels that contain other components and containers.

I/O (rev:4903) Files and resources • • • • •

Create a file in the file system Create a directory in the file system List the contents of a directory List two advantages of using resources instead of files Write code to use resources

Java I/O • • • • •

Understand the purpose of Java I/O Understand the overall design of this API Understand the concept of a stream List and explain all standard java.io classes for byte level I/O Understand the performance benefits in direct buffering and using a buffering stream

10 | Core Java SE 6 for OO and non OO experienced ©2010 IT Education


Course information

Core Java SE 6 for OO and non OO experienced

JAVASE-01.00

Data in and output • • • • •

Understand Object Serialization List and explain all standard java.io classes for character level I/O Understand character encoding and its relation to I/O Introduce the Charset class Understand UTF-8 and Modified UTF-8 encodings

JDBC (rev:4959) (rev:4959) Java™ JDBC™ Data Access API • • •

Connect to a database using JDBC. Execute a statement against a database that returns a ResultSet. Extract multiple rows of data from a ResultSet, where each column value is represented as a String.

Hands-on lab exercises Exercise 1 - Writing a Simple Class Understand the basics of writing a class Exercise 2 - Create a Class with Methods Understand how add basic methods to a class. Exercise 3 - Using looping structures in Java Learn how to create a loop and apply a switch statement. Exercise 4 - Using Strings Understand how to perform important string operations. Exercise 5 - Using StringBuilder Understand how to use a StringBuilder to concatenate multiple string object. Exercise 6 - Tokenizing a String Understand the correct way of splitting a string into tokens. Exercise 7 - Using Primitive Wrappers Familiarize yourself with the methods found in the primitive wrapper classes. 11 | Core Java SE 6 for OO and non OO experienced ©2010 IT Education


Course information

Core Java SE 6 for OO and non OO experienced

JAVASE-01.00 Exercise 8 - Working with Array Familiarize yourself with arrays in Java. Exercise Exercise 9 - Working with fields Familiarize yourself with accessing and declaring instance fields. Exercise 10 - Handle exceptions Learn how to create and catch Java exceptions. Exercise 11 - Using the assert statement (optional) Learn how to use the assert keyword. Exercise 12 - Creating Subclasses Learn the concept of creating subclasses. Exercise 13 - Applying polymorphism Learn how the concept of subclassing can reduce redundant code and provide more flexibility in an application. Exercise 14 - Developing and using interfaces Appreciate the concept of interfaces in Java Exercise 15 - Define and use a generic class Understand how to develop and use generic classes Exercise 16 - Using Collections Understand how to use the Collection framework Exercise 17 - Creating Creating a Thread Learn how to create and start threads, examine the behaviour of threads in Java. Exercise 18 - Document code and generate JavaDoc Understand how to document your code, and generate JavaDoc from that code Exercise 19 - Programming Programming with Events Understand how to trigger and listen to events Exercise 20 - Develop a Basic Swing JFrame Learn how to create and display a JFrame. Exercise 21 - Using the Border Layout on a Frame Familiarize yourself with a JFrame which uses Border Layout

12 | Core Java SE 6 for OO and non OO experienced Š2010 IT Education


Course information

Core Java SE 6 for OO and non OO experienced

JAVASE-01.00 Exercise 22 - Using the Flow Layout on a Frame Familiarize yourself with placing components on a Frame using FlowLayout. Exercise 23 - Using the GridLayout on a Frame Familiarize yourself with GridLayout. Exercise 24 - Using the CardLayout on a Frame Familiarize yourself with the behaviour of using CardLayout. Exercise 25 - Develop a Fancy Swing Frame Learn how to use a combination of Layout managers. Exercise 26 - Develop a entry Form Learn to use events in forms. Exercise 27 - Using different Buttons Learn how to use buttons, check boxes and radio buttons. Exercise 28 - Creating Swing Menus Familiarize yourself with the menu component. Exercise 29 - Using the GridBag on a Form Familiarize yourself with GridBagLayout Exercise 30 - Creating Scrollable Components Learn how to make components scrollable. Exercise 31 - Using Tabbed Panes Learn how to create JTabbedPane Exercise 32 - Creating a fancy Tabbed Pane Create content on a tabbed pane component. Exercise 33 - Loading a File Resource Use File resources Exercise 34 - Copying two files Familiarize yourself with handling files, input and output streams. Exercise 35 - Copying two text files Familiarize yourself with the classes involved for handling text based streams. Exercise 36 - Searching DVDs Familiarize yourself with fundamental JDBC classes. 13 | Core Java SE 6 for OO and non OO experienced Š2010 IT Education


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.