Docsity

Introduction to Java - Lecture Slides - Java | CS 190, Study notes of Java Programming

Partial preview of the text

Download Introduction to Java - Lecture Slides - Java | CS 190 and more Study notes Java Programming in PDF only on Docsity!

CS 190 - Java

Introduction to Java

Andy Mroczkowski

[email protected]

Department of Computer Science

Drexel University

February 4, 2008 / Lecture 3

Outline

Course Status

Course Information & Schedule

Assignments

Review

Access Control

Scope

Packages

Initialization & Cleanup

Creating Objects

Constructors

Cleanup

Re-use

Composition

Inheritance

Delegation

Related Topics

Schedule^1

Jan 7 Course Overview, Introduction to Java

Jan 14 No Class

Jan 21 No Class (University Holiday)

Jan 28 Object Oriented Concepts, Control Statements

Feb 4 Inheritance, Reuse, Abstraction, Classes, Interfaces

Feb 11 Scope, Public/Protected/Private, Java Exception Handling

Feb 18 Midterm, File I/O

Mar 3 Threading

Feb 25 Graphical User Interfaces (AWT, Swing)

Mar 10 Networking, Special Topics (Encryption, Reflection)

Mar 17 Final

1 Also subject to change

Grades

• Assignment 0, 1, 2 are graded

• Grade reporting?

Assignment 2 Comments

• Obvious demos

• Code that doesn’t compile

• Style

• Packages

Assignment 2 Comments

• Obvious demos

• Code that doesn’t compile

• Style

• Packages

Assignment 2 Comments

• Obvious demos

• Code that doesn’t compile

• Style

• Packages

Style - Class Naming

• myGreatClass

• Mygreatclass

• MyGreatClass

• mygreatclass

• my_great_class

Style - Variable Naming

• mySweetVariable

• Mysweetvariable

• MySweetVariable

• mysweetvariable

• my_sweet_variable

Style - Package Naming

• myRadPackage

• Myradpackage

• MyRadPackage

• myradpackage

• my_rad_package

Style - Identation

class WhileTest {

public static void main(String[] args) {

long now = new Date().getTime();

long later = new Date().getTime() + 5000;

while ( now < later ) {

now = new Date().getTime();

Style - Identation

class WhileTest {

public static void main(String[] args) {

long now = new Date().getTime();

long later = new Date().getTime() + 5000;

while ( now < later ) {

now = new Date().getTime();

Review

Review from last lecture

Review

• Object-Oriented concepts

• Key Concepts

• Inheritance

• Polymorphism

• Operators & Control Statements

• Operators

• Conditionals

• Loops