Preface IIntroduction Objectives I-2 Course Overview I-3 1Introducing the Java and Oracle Platforms Objectives 1-2 What Is Java? 1-3 Key Benefits of Java.

Slides:



Advertisements
Similar presentations
4 Control Statements: Part 1.
Advertisements

Final and Abstract Classes
Distributed Systems Architectures
Chapter 7 System Models.
Chapter 8 Software Prototyping.
Chapter 7 Constructors and Other Tools. Copyright © 2006 Pearson Addison-Wesley. All rights reserved. 7-2 Learning Objectives Constructors Definitions.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 12 Introduction to ASP.NET.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Copyright © 2003 Pearson Education, Inc. Slide 7-1 Created by Cheryl M. Hughes The Web Wizards Guide to XML by Cheryl M. Hughes.
Copyright © 2003 Pearson Education, Inc. Slide 1.
Processes and Operating Systems
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
Author: Julia Richards and R. Scott Hawley
1 Copyright © 2013 Elsevier Inc. All rights reserved. Chapter 3 CPUs.
Properties Use, share, or modify this drill on mathematic properties. There is too much material for a single class, so you’ll have to select for your.
Business Transaction Management Software for Application Coordination 1 Business Processes and Coordination. Introduction to the Business.
Communicating in J2EE.
19 Copyright © 2005, Oracle. All rights reserved. Distributing Modular Applications: Developing Web Services.
21 Copyright © 2005, Oracle. All rights reserved. Oracle Application Server 10g Transaction Support.
18 Copyright © 2005, Oracle. All rights reserved. Distributing Modular Applications: Introduction to Web Services.
12 Copyright © 2005, Oracle. All rights reserved. Structuring Code Using Abstract Classes and Interfaces.
5 Copyright © 2005, Oracle. All rights reserved. Accessing the Database with Servlets.
4 Copyright © 2005, Oracle. All rights reserved. Creating the Web Tier: Servlets.
16 Copyright © 2005, Oracle. All rights reserved. Developing Message-Driven Beans.
11 Copyright © 2005, Oracle. All rights reserved. Creating the Business Tier: Enterprise JavaBeans.
3 Copyright © 2005, Oracle. All rights reserved. Basic Java Syntax and Coding Conventions.
11 Copyright © 2005, Oracle. All rights reserved. Using Arrays and Collections.
16 Copyright © 2005, Oracle. All rights reserved. Using JDBC to Access the Database.
15 Copyright © 2005, Oracle. All rights reserved. Container-Managed Relationships (CMRs)
1 Copyright © 2005, Oracle. All rights reserved. Introducing the Java and Oracle Platforms.
7 Copyright © 2005, Oracle. All rights reserved. Creating Classes and Objects.
9 Copyright © 2005, Oracle. All rights reserved. Modularizing JavaServer Pages Development with Tags.
14 Copyright © 2005, Oracle. All rights reserved. User Interface Design: Swing Basics Planning the Application Layout.
8 Copyright © 2005, Oracle. All rights reserved. Creating the Web Tier: JavaServer Pages.
J2EE Overview.
10 Copyright © 2005, Oracle. All rights reserved. Reusing Code with Inheritance and Polymorphism.
15 Copyright © 2005, Oracle. All rights reserved. Adding User Interface Components and Event Handling.
6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.
17 Copyright © 2005, Oracle. All rights reserved. Deploying Applications by Using Java Web Start.
Custom Statutory Programs Chapter 3. Customary Statutory Programs and Titles 3-2 Objectives Add Local Statutory Programs Create Customer Application For.
Week 2 The Object-Oriented Approach to Requirements
Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Exercise Session 5.
13 Copyright © 2005, Oracle. All rights reserved. Monitoring and Improving Performance.
Microsoft Access.
Chapter 6 Data Design.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Tutorial 12 – Security Panel Application Introducing.
Basel-ICU-Journal Challenge18/20/ Basel-ICU-Journal Challenge8/20/2014.
1..
Copyright © 2003 by Prentice Hall Computers: Tools for an Information Age Chapter 15 Programming and Languages: Telling the Computer What to Do.
Chapter 10: The Traditional Approach to Design
Analyzing Genes and Genomes
Systems Analysis and Design in a Changing World, Fifth Edition
Types of selection structures
Pointers and Arrays Chapter 12
Chapter 12 Working with Forms Principles of Web Design, 4 th Edition.
Chapter 12 OOP: Creating Object- Oriented Programs Copyright © 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. McGraw-Hill.
PSSA Preparation.
Chapter 11 Component-Level Design
Chapter 11 Creating Framed Layouts Principles of Web Design, 4 th Edition.
Essential Cell Biology
 2003 Prentice Hall, Inc. All rights reserved. 1 Chapter 13 - Exception Handling Outline 13.1 Introduction 13.2 Exception-Handling Overview 13.3 Other.
Abstract Class, Packages and interface from Chapter 9
1 Abstract Class and Packages from Chapter 9 Lecture.
Modeling Main issues: What do we want to build How do we write this down.
Chapter 9: Using Classes and Objects. Understanding Class Concepts Types of classes – Classes that are only application programs with a Main() method.
Java Course Outline Kumar Harshit, USW. Course Description Teaches students to program using the Java programming language with the help of the Netbeans.
Principles of Computer Programming (using Java) Review Haidong Xue Summer 2011, at GSU.
Parts of JAVA 1www.gowreeswar.com. Features of JAVA 2www.gowreeswar.com.
Preface IIntroduction Objectives I-2 Course Overview I-3 1Oracle Application Development Framework Objectives 1-2 J2EE Platform 1-3 Benefits of the J2EE.
Presentation transcript:

Preface IIntroduction Objectives I-2 Course Overview I-3 1Introducing the Java and Oracle Platforms Objectives 1-2 What Is Java? 1-3 Key Benefits of Java 1-4 An Object-Oriented Approach 1-6 Platform Independence 1-7 Using Java with Enterprise Internet Computing 1-8 Using the Java Virtual Machine 1-10 How Does JVM Work? 1-12 Benefits of Just-In-Time (JIT) Compilers 1-14 Implementing Security in the Java Environment 1-16 Deployment of Java Applications 1-18 Using Java with Oracle 10g 1-19 Java Software Development Kit 1-20 Using the Appropriate Development Kit 1-21 Integrated Development Environment 1-22 Exploring the JDeveloper Environment 1-23 Oracle 10g Products 1-24 Summary Defining Object-Oriented Principles Objectives 2-2 What Is Modeling? 2-4 What Are Classes and Objects? 2-5 An Object s Attributes Maintain Its State 2-6 Objects Have Behavior 2-8 Objects Are Modeled as Abstractions 2-9 Defining Object Composition 2-11 The Donut Diagram 2-13 Guided Practice: Spot the Operations and Attributes 2-14 Collaborating Objects 2-15 Objects Interact Through Messages 2-16 What Is a Class? 2-17 How Do You Identify a Class? 2-18 Comparing Classes and Objects 2-19 What Is Encapsulation? 2-21 What Is Inheritance? 2-22 Using the Is-a-Kind-of Relationship 2-23 What Is Polymorphism? 2-24 Contents iii

Architecture Rules for Reuse 2-26 Engineering for a Black Box Environment 2-27 Order Entry UML Diagram 2-28 Summary 2-29 Practice 2: Overview 2-30 Order Entry System Partial UML Class Model Basic Java Syntax and Coding Conventions Objectives 3-2 Examining Toolkit Components 3-4 Exploring Packages in J2SE/J2EE 3-5 Documenting Using the J2SE 3-6 Contents of a Java Source 3-7 Establishing Naming Conventions 3-8 More About Naming Conventions 3-10 Defining a Class 3-12 Rental Class: Example 3-13 Creating Code Blocks 3-15 Defining Java Methods 3-16 Examples of a Method 3-17 Declaring Variables 3-18 Examples of Variables in the Context of a Method 3-19 Rules for Creating Statements 3-20 What Are JavaBeans? 3-21 Managing Bean Properties 3-22 Exposing Properties and Methods 3-23 JavaBean Standards at Design Time 3-24 Compiling and Running a Java Application 3-25 The CLASSPATH Variable 3-26 CLASSPATH : Example 3-27 Summary 3-28 Practice 3: Overview Exploring Primitive Data Types and Operators Objectives 4-2 Reserved Keywords 4-4 Variable Types 4-5 Primitive Data Types 4-7 What Are Variables? 4-9 Declaring Variables 4-10 Local Variables 4-11 Defining Variable Names 4-12 What Are Numeric Literals? 4-13 What Are Nonnumeric Literals? 4-15 Guided Practice: Declaring Variables 4-17 What Are Operators? 4-19 iv

Categorizing Operators 4-20 Using the Assignment Operator 4-21 Working with Arithmetic Operators 4-22 More on Arithmetic Operators 4-23 Examining Conversions and Casts 4-24 Incrementing and Decrementing Values 4-26 Relational and Equality Operators 4-27 Using the Conditional Operator ( ?: ) 4-28 Using Logical Operators 4-29 Compound Assignment Operators 4-30 Operator Precedence 4-31 More on Operator Precedence 4-32 Concatenating Strings 4-33 Summary 4-34 Practice 4: Overview Controlling Program Flow Objectives 5-2 Categorizing Basic Flow Control Types 5-4 Using Flow Control in Java 5-6 Using the if Statement 5-7 Nesting if Statements 5-8 Guided Practice: Spot the Mistakes 5-9 Defining the switch Statement 5-10 More About the switch Statement 5-12 Looping in Java 5-13 Using the while Loop 5-14 Using the do…while Loop 5-15 Using the for Loop 5-16 More About the for Loop 5-17 Guided Practice: Spot the Mistakes 5-18 The break Statement 5-19 Summary 5-20 Practice 5: Overview Building Applications with Oracle JDeveloper 10g Objectives 6-2 What Is Oracle JDeveloper 10g? 6-3 Exploring the JDeveloper Environment 6-4 Examining Workspaces 6-5 What Are Projects? 6-7 Creating JDeveloper Items 6-8 Creating an Application Workspace 6-9 Specifying Project Details 6-10 Selecting Additional Libraries 6-11 Adding a New J2SE 6-12 v

Looking at the Directory Structure 6-13 Exploring the Skeleton Java Application 6-14 Finding Methods and Fields 6-15 Supporting Code Development with Profiler and Code Coach 6-16 Customizing JDeveloper 6-17 Using the Help System 6-18 Obtaining Help on a Topic 6-19 Oracle JDeveloper 10g Debugger 6-20 Setting Breakpoints 6-22 Using the Debugger Windows 6-24 Stepping Through a Program 6-25 Watching Data and Variables 6-26 Summary 6-27 Practice 6: Overview Creating Classes and Objects Objectives 7-2 Using Java Classes 7-4 Comparing Classes and Objects 7-5 Creating Objects 7-6 Using the new Operator 7-7 Comparing Primitives and Objects 7-8 Using the null Reference 7-9 Assigning References 7-10 Declaring Instance Variables 7-11 Accessing public Instance Variables 7-12 Defining Methods 7-13 Calling a Method 7-14 Specifying Method Arguments: Examples 7-15 Returning a Value from a Method 7-16 Calling Instance Methods 7-17 Applying Encapsulation in Java 7-18 Passing Primitives into Methods 7-19 Passing Object References into Methods 7-20 What Are Class Variables? 7-21 Initializing Class Variables 7-22 What Are Class Methods? 7-23 Guided Practice: Class Methods or Instance Methods 7-24 Examples in Java 7-25 Creating Classes Using the Class Editor 7-26 What Are Java Packages? 7-27 Grouping Classes in a Package 7-28 Setting the CLASSPATH with Packages 7-29 Access Modifiers 7-30 Summary 7-32 Practice 7: Overview 7-33 vi

8Object Life Cycle and Inner Classes Objectives 8-2 Overloading Methods 8-4 Using the this Reference 8-5 Initializing Instance Variables 8-6 What Are Constructors? 8-7 Defining and Overloading Constructors 8-8 Sharing Code Between Constructors 8-9 final Variables, Methods, and Classes 8-10 Reclaiming Memory 8-11 Using the finalize() Method 8-12 What Are Inner Classes? 8-13 Using Member Inner Class 8-14 Using Local Inner Class 8-15 Defining Anonymous Inner Classes 8-16 Using the Calendar Class 8-17 Summary 8-18 Practice 8: Overview Using Strings, String Buffer, Wrapper, and Text-Formatting Classes Objectives 9-2 What Is a String ? 9-3 Creating a String 9-4 Concatenating Strings 9-5 Performing Operations on Strings 9-6 Performing More Operations on Strings 9-7 Comparing String Objects 9-8 Producing Strings from Other Objects 9-9 Producing Strings from Primitives 9-10 Producing Primitives from Strings 9-11 Wrapper Class Conversion Methods 9-12 Changing the Contents of a String 9-13 Formatting Classes 9-14 Using the SimpleDateFormat Class 9-15 Using the MessageFormat Class 9-16 Using DecimalFormat 9-17 Guided Practice 9-18 Using Regular Expressions 9-20 About System.out.println 9-23 About OutputStream and PrintStream 9-24 What Is Object Serialization? 9-25 Serialization Streams, Interfaces, and Modifiers 9-28 Summary 9-29 Practice 9: Overview 9-30 vii

10Reusing Code with Inheritance and Polymorphism Objectives 10-2 Key Object-Oriented Components 10-3 Example of Inheritance 10-4 Specifying Inheritance in Java 10-5 Defining Inheritance by Using Oracle JDeveloper 10g 10-6 What Does a Subclass Object Look Like? 10-7 Default Initialization 10-8 The super Reference 10-9 The super Reference Example Using Superclass Constructors Specifying Additional Methods Overriding Superclass Methods Invoking Superclass Methods Example of Polymorphism in Java Treating a Subclass as Its Superclass Browsing Superclass References by Using Oracle JDeveloper 10g Acme Video and Polymorphism Using Polymorphism for Acme Video Using the instanceof Operator Limiting Methods and Classes with final Ensuring Genuine Inheritance Summary Practice 10: Overview Using Arrays and Collections Objectives 11-2 What Is an Array? 11-3 Creating an Array of Primitives 11-4 Declaring an Array of Primitives 11-5 Creating an Array Object for an Array of Primitives 11-6 Initializing Array Elements 11-8 Creating an Array of Object References 11-9 Initializing the Objects in the Array Using an Array of Object References Arrays and Exceptions Multidimensional Arrays main() Revisited Working with Variable-Length Structures Modifying a Vector Accessing a Vector Java Collections Framework Collections Framework Components Using ArrayList and Hashtable Using Iterators Summary Practice 11: Overview viii

12Structuring Code Using Abstract Classes and Interfaces Objectives 12-2 Defining Abstract Classes 12-3 Creating Abstract Classes 12-4 What Are Abstract Methods? 12-5 Defining Abstract Methods 12-7 Defining and Using Interfaces 12-8 Examples of Interfaces 12-9 Creating Interfaces Implementing Interfaces Sort: A Real-World Example Overview of the Classes How the Sort Works The Sortable Interface The Sort Class The Movie Class Using the Sort Using instanceof with Interfaces Summary Practice 12: Overview Throwing and Catching Exceptions Objectives 13-2 What Is an Exception? 13-3 How Does Java Handle Exceptions? 13-4 Advantages of Java Exceptions: Separating Error Handling Code 13-5 Advantages of Java Exceptions: Passing Errors Up the Call Stack 13-7 Advantages of Java Exceptions: Exceptions Cannot Be Ignored 13-8 Checked Exceptions, Unchecked Exceptions, and Errors 13-9 What to Do with an Exception Catching and Handling Exceptions Catching a Single Exception Catching Multiple Exceptions Cleaning Up with a finally Block Catching and Handling Exceptions: Guided Practice Allowing an Exception to Pass to the Calling Method Throwing Exceptions Creating Exceptions Catching an Exception and Throwing a Different Exception Summary Practice 13: Overview ix

14User Interface Design: Swing Basics Planning the Application Layout Objectives 14-2 Running Java UI Applications 14-3 AWT, Swing, and JFC 14-4 Swing Features 14-6 Lightweight or Heavyweight Components? 14-8 Planning the UI Layout 14-9 The Containment Hierarchy Top-Level Containers Intermediate Containers Atomic Components Layout Management Overview Border Layout GridBag Layout GridBag Constraints Using Layout Managers Combining Layout Managers Using Frames or Dialogs Using JPanel Containers Adding Borders to Components Using Internal Frames Swing Text Controls Adding Components with Oracle JDeveloper 10g Creating a Frame Adding Components Setting Pluggable Look and Feel Summary Practice 14: Overview Adding User Interface Components and Event Handling Objectives 15-2 Swing Components 15-3 Swing Components in JDeveloper 15-5 Invoking the UI Editor 15-7 How to Add a Component to a Form 15-8 Edit the Properties of a Component 15-9 Code Generated by JDeveloper Creating a Menu Using JDeveloper Menu Editor Practice 15-1: Overview UI for Java Application Java Event Handling Model Event Handling Code Basics Event Handling Process: Registration Event Handling Process: The Event Occurs Event Handling Process: Running the Event Handler x

Using Adapter Classes for Listeners Swing Model View Controller Architecture Basic Text Component Methods Basic JList Component Methods What Events Can a Component Generate? How to Define an Event Handler in JDeveloper Default Event Handling Code Style Generated by JDeveloper Completing the Event Handler Method Summary Practice 15-2: Overview Using JDBC to Access the Database Objectives 16-2 Java, J2EE, and Oracle 10g 16-3 Connecting to a Database with Java 16-4 What Is JDBC? 16-5 Preparing the Environment 16-6 Steps for Using JDBC to Execute SQL Statements 16-8 Step 1: Registering the Driver 16-9 Connecting to the Database Oracle JDBC Drivers: Thin Client Driver Oracle JDBC Drivers: OCI Client Drivers Choosing the Right Driver Step 2: Getting a Database Connection About JDBC URLs JDBC URLs with Oracle Drivers Step 3: Creating a Statement Using the Statement Interface Step 4a: Executing a Query The ResultSet Object Step 4b: Submitting DML Statements Step 4b: Submitting DDL Statements Step 5: Processing the Query Results Step 6: Closing Connections A Basic Query Example Mapping Database Types to Java Types Handling an Unknown SQL Statement Handling Exceptions Managing Transactions The PreparedStatement Object How to Create a PreparedStatement How to Execute a PreparedStatement Maximize Database Access Connection Pooling Summary Practice 16: Overview xi

17Deploying Applications by Using Java Web Start Objectives 17-2 What Is Java Web Start? 17-3 Running a Web Start Application 17-4 Advantages of Web Start 17-5 Examining the JNLP File 17-6 Deploying Applications with JDeveloper 17-7 Creating the Deployment Profile File 17-8 Saving the Deployment Profile 17-9 Selecting Files to Deploy Making an Executable.jar File Creating and Deploying the Archive File Using JDeveloper to Deploy an Application to Java Web Start Step 1: Generate Deployment Profiles and Archive Application Step 2a: Start OC4J Step 2b: Creating a Connection Step 3: Use Web Start Wizard to Create a JNLP File Step 4: Archive and Deploy the Application to the OC4J Server Summary Practice 17: Overview Appendix A: Practice Solutions Appendix B: Java Language Quick-Reference Guide Appendix C: Practice Solutions xii