Principles of Computer Programming (using Java) Review Haidong Xue Summer 2011, at GSU.

Slides:



Advertisements
Similar presentations
Java Language Quick-Reference Guide B. Oracle10g: Java Programming B - 2 Console Output Java applications and applets can output simple messages to the.
Advertisements

Object Oriented Programming with Java
COSC 2006 Data Structures I Instructor: S. Xu URL:
Software Engineering Implementation Lecture 3 ASPI8-4 Anders P. Ravn, Feb 2004.
METHOD OVERRIDING 1.Sub class can override the methods defined by the super class. 2.Overridden Methods in the sub classes should have same name, same.
Written by: Dr. JJ Shepherd
Lab Information Security Using Java (Review) Lab#0 Omaima Al-Matrafi.
Principles of Computer Programming (using Java) Chapter 10 Subclasses Haidong Xue Summer 2011, at GSU.
George Blank University Lecturer. CS 602 Java and the Web Object Oriented Software Development Using Java Chapter 4.
OOP in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
June 1, 2000 Object Oriented Programming in Java (95-707) Java Language Basics 1 Lecture 3 Object Oriented Programming in Java Language Basics Classes,
Chapter 10 Classes Continued
8.1 Classes & Inheritance Inheritance Objects are created to model ‘things’ Sometimes, ‘things’ may be different, but still have many attributes.
OOP in Java Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Java Software Solutions Foundations of Program Design Sixth Edition by Lewis.
Design and Analysis of Algorithms Review of algorithm analysis Haidong Xue Summer 2012, at GSU.
Java Course Outline Kumar Harshit, USW. Course Description Teaches students to program using the Java programming language with the help of the Netbeans.
1 Identifiers  Identifiers are the words a programmer uses in a program  An identifier can be made up of letters, digits, the underscore character (
OOPs Object oriented programming. Based on ADT principles  Representation of type and operations in a single unit  Available for other units to create.
CSM-Java Programming-I Spring,2005 Objects and Classes Overview Lesson - 1.
Intro to OOP with Java, C. Thomas Wu
Introduction to Object Oriented Programming. Object Oriented Programming Technique used to develop programs revolving around the real world entities In.
Inheritance and Class Hierarchies Ellen Walker CPSC 201 Data Structures Hiram College.
Object Oriented Programming: Java Edition By: Samuel Robinson.
Java Tutorial. Object-Oriented Programming Concepts Object –a representation of some item state  fields/members and should be encapsulated behavior 
Programming in Java Unit 2. Class and variable declaration A class is best thought of as a template from which objects are created. You can create many.
Algorithm Programming Bar-Ilan University תשס"ח by Moshe Fresko.
5-Aug-2002cse Arrays © 2002 University of Washington1 Arrays CSE 142, Summer 2002 Computer Programming 1
Hello.java Program Output 1 public class Hello { 2 public static void main( String [] args ) 3 { 4 System.out.println( “Hello!" ); 5 } // end method main.
Java Introduction 密碼學與應用 海洋大學資訊工程系 丁培毅.
Chris Kiekintveld CS 2401 (Fall 2010) Elementary Data Structures and Algorithms Inheritance and Polymorphism.
Page: 1 การโปรแกรมเชิงวัตถุด้วยภาษา JAVA บุรินทร์ รุจจนพันธุ์.. ปรับปรุง 15 มิถุนายน 2552 Keyword & Data Type มหาวิทยาลัยเนชั่น.
Inheritance. Inheritance - Introduction Idea behind is to create new classes that are built on existing classes – you reuse the methods and fields and.
CMSC 341 Java Packages, Classes, Variables, Expressions, Flow Control, and Exceptions.
OOPs Object oriented programming. Abstract data types  Representationof type and operations in a single unit  Available for other units to create variables.
1 COSC2007 Data Structures II Chapter 9 Class Relationships.
Chapter 8 Class Inheritance and Interfaces F Superclasses and Subclasses  Keywords: super F Overriding methods  The Object Class  Modifiers: protected,
Application development with Java Lecture 21. Inheritance Subclasses Overriding Object class.
 In the java programming language, a keyword is one of 50 reserved words which have a predefined meaning in the language; because of this,
Java Programming: From Problem Analysis to Program Design, 3e Chapter 11 Inheritance and Polymorphism.
Inheritance and Polymorphism. Superclass and Subclass Inheritance defines a relationship between objects that share characteristics. It is a mechanism.
Spring 2009 Programming Fundamentals I Java Programming XuanTung Hoang Lecture No. 8.
Quick Review of OOP Constructs Classes:  Data types for structured data and behavior  fields and methods Objects:  Variables whose data type is a class.
Written by: Dr. JJ Shepherd
Object orientation and Packaging in Java Object Orientation and Packaging Introduction: After completing this chapter, you will be able to identify.
Terms and Rules II Professor Evan Korth New York University (All rights reserved)
UMass Lowell Computer Science Java and Distributed Computing Prof. Karen Daniels Fall, 2000 Lecture 10 Java Fundamentals Objects/ClassesMethods.
JAVA ACCESS MODIFIERS. Access Modifiers Access modifiers control which classes may use a feature. A classes features are: - The class itself - Its member.
Geoff Holmes and Bernhard Pfahringer COMP206-08S General Programming 2.
 It is a pure oops language and a high level language.  It was developed at sun microsystems by James Gosling.
Information and Computer Sciences University of Hawaii, Manoa
Objects as a programming concept
Haidong Xue Summer 2011, at GSU
Inheritance and Polymorphism
Internet and Java Foundations, Programming and Practice
University of Central Florida COP 3330 Object Oriented Programming
Haidong Xue Summer 2011, at GSU
Haidong Xue Summer 2011, at GSU
Principles of Computer Programming (using Java) Chapter 2, Part 1
null, true, and false are also reserved.
Java Programming Language
Conditional Statements
Introduction to Java Programming
Java Programming Course
Session 2: Introduction to Object Oriented Programming
CIS 199 Final Review.
Final and Abstract Classes
Haidong Xue Summer 2011, at GSU
Haidong Xue Summer 2011, at GSU
Presentation transcript:

Principles of Computer Programming (using Java) Review Haidong Xue Summer 2011, at GSU

Content Java foundations Primitive type variables Arrays Control structures Classes and objects Where you are

Java foundations What is a Java program? – classes, main, packages How to execute a Java program? – JVM, JDK, JRE Expressions – int, double, boolean, and the operators Member variables and member methods – static, public, private, protected

Java foundations Parameters – What is it? – What is passed? Comments – //, /* … */ Identifiers Conventions – Naming, format

Java foundations Keywords – boolean, break, case, catch, char, class, continue, default, do, double, else, extends, final, for, if, import, int, new, package, private, protected, public, return, static, super, switch, this, throw, try, void, while

Primitive type variables int double boolean char

Arrays What is a array? How to create a array? What is an array variable? How to access a array?

Control structures Branches – if, switch – break Loops – while, do-while, for – break, continues – Nested loops Exceptions – try, throw, catch

Control structures Exceptions – Type of exceptions – try, throw, catch

Classes and objects How to declare classes? How to create objects? Object and object variable Inheritance – How to specify a superclass – What is the default superclass – What are not shared by subclass? – How to call a constructor of the superclass?

Classes and objects Overriding – Why we need overriding? – How to override? Polymorphism – An object of a subclass IS AN object of superclass – When using superclass object variable pointed to an object of subclass and calling a method, the overridden method will be called.

Where we are in CS What we learnt – Basic rules of a object oriented programming language – Good news: all the OOP language are similar, like C#, C++ and so on.

Software Hardware Compiler Machine Language Data Structure Operating System Principles of CompilersAutomata Algorithms Software Engineering Computer Architecture Computer Composition Microchip Interfaces VLSI Design Programming Language Computer Database Web programming Signal processing Applications Data mining Network Security Wireless Network Graphics AIRobotics