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

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

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

  • Slide 1
  • Principles of Computer Programming (using Java) Review Haidong Xue Summer 2011, at GSU
  • Slide 2
  • Content Java foundations Primitive type variables Arrays Control structures Classes and objects Where you are
  • Slide 3
  • 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
  • Slide 4
  • Java foundations Parameters What is it? What is passed? Comments //, /* */ Identifiers Conventions Naming, format
  • Slide 5
  • 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
  • Slide 6
  • Primitive type variables int double boolean char
  • Slide 7
  • Arrays What is a array? How to create a array? What is an array variable? How to access a array?
  • Slide 8
  • Control structures Branches if, switch break Loops while, do-while, for break, continues Nested loops Exceptions try, throw, catch
  • Slide 9
  • Control structures Exceptions Type of exceptions try, throw, catch
  • Slide 10
  • 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?
  • Slide 11
  • 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.
  • Slide 12
  • 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.
  • Slide 13
  • 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