Advanced Java New York University School of Continuing and Professional Studies.
-
Upload
felicity-hudson -
Category
Documents
-
view
220 -
download
0
Transcript of Advanced Java New York University School of Continuing and Professional Studies.
Advanced Java
New York University
School of Continuing and Professional Studies
2
Language of the Future
• By the year 2005 all software applications will be web based.
• Most, if not all of those will be written in Java.
• “Write once run everywhere”
3
Course Objectives
• Train students in writing java programs – including applets.
• Enhance understanding and knowledge of java APIs and frameworks.
• Prepare students for sun’s java certification programs.
• Provide resources and support to help students achieve their career objectives.
4
Prerequisites
• Basic knowledge of computers.
• Familiarity with any plain text editor (like notepad).
• Working in command line mode.
• Java language Fundamentals
• Ability to write, compile and run a basic Java program and applet
5
Useful but Not Required
• Knowledge of or experience with C++
• Basic concepts of Object Oriented Design and Programming.
• Knowledge of HTML.
• Knowledge of Database concepts and familiarity with SQL
Feedback
Students’ Expectations From This Course
7
Agenda
• Every Tuesday/Wednesday evening from 6:20 PM to 9:20 PM - Prefer 6 pm to 9 pm if all students agree, and if the time is not invonvenient for anyone.
• For every 3 hours of lecture, student is expected to do “hands on” for at least 3 hours.
8
Overview • Focus on Object Oriented Design and
Development using Java.
• Coverage of latest technologies in Web Applications development
Threads, Applets
JDBC,RMI,EJBs
Servlets, JSPs, Beans, XML
StreamsFilesI/IO
AWT,Events
Lists, Vectors,Sockets
Objects and Classes
Java Libraries,OOD, OOP
LanguageFundamentals
9
Session 1
• Java certification overview
• Introduction to programming and java
• First java program
• First java applet
• Language Fundamentals
10
Session 2
• Streams and File I/O
• Multithreading
11
Session 3
• Collections
• Interfaces and inheritance
12
Session 4
• Concepts in Socket Programming
• Java Network Programming
• Implementing Socket based clients and servers in Java
• Java Beans
13
Session 5
• Basic Database concepts
• Java Database Connectivity
14
Session 6
• Java Servlets
• Java Server Pages
15
Day 7
• RMI
• Enterprise Java Beans
• SWING
16
Session 8
• AWT
• Event driven programming
17
Session 9
• Java and XML
• XML and XSLT
18
Session 10
• Java Native Interfaces
• Final Exam
Feedback
Questions or Comments
20
Java Certification
• Programmer
• Developer
• Architect
21
Sun Certified Programmer for Java 2 Platform
Exam number: 310-025
Exam type: multiple choice/short answer
No of questions: approximately 59
Pass score: 61%
Test time: 2 hours
22
Sun Certified Developer for Java 2 Platform
Exam Number: 310-027
Exam Type: Code Example and Instructions
Pass Score: 80%
Test Time: Limited to life of the program.
23
Sun Certified Architect forJava 2 Platform
Exam Number: 310-050
Exam Type: multiple choice/short answer
No. of Questions: approximately 60
Pass Score: 75%
Test Time: 2 hours
24
Exam Registration
Exam if offered by sylvan Prometric
Http://www.sylvanprometric.Com
25
Introduction to Java
• Language
• Programming Tool
• Virtual Machine Environment
• Framework of Classes/Interfaces
26
Advantages of Java
• Simple• Portable• Object oriented• Interpreted• Distributed• Architecture neutral
• High performance• Robust• Multithreaded• Secure• Dynamic• Quick development
27
First Java Program
• Source Code Example – Welcome.java
• Compiling and Running the first Java program– Create the program source file– Compile it using javac
C:>javac Welcome.java
– Run it using java C:>java Welcome
28
Parts of a Java program
• Class name
• The “main” method
• Variable declarations
• Assignment statements
• Program instructions
• Calls to other methods of other classes
29
Java Applets
• Java code
• HTML code
• Flavours of applets
• Applet example
• Running applets
30
Java Language Fundamentals
• Comments
• Data types
• Variables
• Reserved words (Java keywords)
31
Java Language Fundamentals
• Assignments
• Initializers
• Conversions between numeric types
32
Java Language Fundamentals
• Constants
• Operators
• Operator precedence
• Expression evaluation
33
Java Language Fundamentals
• Strings
• Concatenation
• Testing for equality
Feedback
Questions or Comments
35
Control Flow
• Statement
• Expression
• Block
• Control structure
36
Conditional Statements
if (condition)
statement;
else
statement;
37
Loops
while ( condition )
statement;
for ( int i = 0; i < 5; i++ )
statement;
38
Multiple Selections
switch ( variable )
{
case <constant>: statement;
break;
case <constant>: statement;
break;
default: statement;
}
39
Class Methods
Program components – or functions
Must be inside a class definition
40
Arrays
• Arrays are Objects in Java
• Creating an array
• Initializing an array
• Copying an array
41
Arrays
• Arrays may be passed to methods
• Arrays may be returned from methods
42
Multidimensional Arrays
• Matrix
• Array of Arrays
43
Objects and Classes
• A class is a “template” or a “blueprint”
• Objects are the “cookies” or “buildings”
44
Objects and Classes
• Creating new objects
• Data encapsulation
45
Objects
• Black-box approach
• Object’s behavior
• Object’s state
• Object’s identity
• Instances of a class
46
An Order Processing System
• Item
• Order
• Shipping address
• Payment
• Account
47
Methods
• Order.addItem
• Order.ship
• Order.cancel
• Payment.authorize
48
Relationship between Classes
• Uses
• Has-A
• Is-A
49
Traditional Programming
GlobalData
function
function
function
function
50
Object Oriented Programming
Object 1
Object 3
Object 2
method
method
method
method
51
Examples
• Card.java
• CardDeck.java
• EmployeeTest.java