Object Oriented Programming and Design in Java Session 1 - - PowerPoint PPT Presentation

object oriented programming and design in java
SMART_READER_LITE
LIVE PREVIEW

Object Oriented Programming and Design in Java Session 1 - - PowerPoint PPT Presentation

Object Oriented Programming and Design in Java Session 1 Instructor: Bert Huang Today's Plan Course information Prerequisites Assignments and expectations Course goals Room Situation Tentatively here, 173 Macy, TC


slide-1
SLIDE 1

Object Oriented Programming and Design in Java

Session 1 Instructor: Bert Huang

slide-2
SLIDE 2

Today's Plan

  • Course information
  • Prerequisites
  • Assignments and expectations
  • Course goals
slide-3
SLIDE 3

Room Situation

  • Tentatively here, 173 Macy, TC
  • Register ASAP so CS dept. can request

registrar to assign bigger room

slide-4
SLIDE 4

Course Information

slide-5
SLIDE 5

Staff

  • Instructor: Bert Huang

bert@cs.columbia.edu

  • 3rd year PhD Candidate

(5th year graduate student)

  • TAs: John Graham

Lauren Pulley more TBA

slide-6
SLIDE 6

Schedule

Sun Mon Tue Wed Thu Fri

John 1-3 Class 11-12:15 Bert 2-4 CEPSR 624 Lauren 5:30-7:30 Class 11-12:15

slide-7
SLIDE 7

COMS W1007

  • The second course for majors in

computer science. A rigorous treatment

  • f object-oriented concepts using Java

as an example language. Development

  • f sound programming and design skills,

problem solving and modeling of real world problems from science, engineering, and economics using the

  • bject-oriented paradigm.
slide-8
SLIDE 8

Topics

  • Programming style
  • Classes and

methods

  • UML diagrams
  • Programming by

contract

  • Designing interfaces
  • Polymorphism
  • Encapsulation
  • Inheritance
  • Design patterns
  • Frameworks
  • Java graphics and

GUIs

  • Multithreading
slide-9
SLIDE 9

Prerequisites

  • COMS W1004: Intro to CS and

Programming in Java

  • or AP CS with a grade of 4 or 5
slide-10
SLIDE 10

Required Textbook

  • Object Oriented

Programming and Design. Cay Horstmann

  • ISBN: 0-471-74487-5
slide-11
SLIDE 11

Online Resources

  • Course website:

http://www.cs.columbia.edu/~bert/courses/1007

  • Book's website:

http://www.horstmann.com/design_and_patterns.html

  • Courseworks:

http://courseworks.columbia.edu

slide-12
SLIDE 12

Grading

  • Five homework assignments, 10% each
  • Late policy: 10% penalty each day (up

to three days)

  • Midterm exam, 20%
  • Final exam, 30%
slide-13
SLIDE 13

Programming Assignments

  • Programs must compile and run in

Java SE 6 (build 1.6.0_17-b04)

  • version currently on CUNIX machines
  • We will use graphics, so you'll need an

X11-capable machine to run off CUNIX

  • You may want to use IDE like Eclipse
slide-14
SLIDE 14

Academic Honesty

  • http://www.cs.columbia.edu/education/honesty
  • 1st offense: grade of zero, report to dean
  • 2nd offense or major violation: fail course,

report to dean

  • Catching academic dishonesty in CS is easy
  • All work in this class is individual;

no collaboration

slide-15
SLIDE 15

Expectations

  • Start early
  • Ask questions in class (raise your hand)
  • or office hours, message board, email
  • Clarity
  • Seek extra help
slide-16
SLIDE 16

Course survey

  • 1 point extra credit on final grade
  • Help me calibrate the course
  • http://spreadsheets.google.com/

viewform? hl=en&formkey=dGtMam5GMEctQVlsQ mpMaFdJUXo2MVE6MA

  • (or link off the course homepage)
slide-17
SLIDE 17

Java Skills You Should Have

  • Compiling a Java program
  • Input/output via console or file system
  • Basic graphical interface
  • commenting for javadoc
  • (Programming in an IDE)
slide-18
SLIDE 18

Course Goals

slide-19
SLIDE 19

Why Study OOP and Design?

  • Writing a code is easy
  • Understanding code is hard
  • Good organization and design of

programs makes understanding easier

slide-20
SLIDE 20

Bad Design: Goto

  • 1. if (stillRunning())
  • 2. doSomething()
  • 3. goto 1

while(stillRunning()) doSomething()

slide-21
SLIDE 21

What is OOP?

  • A style of programming where all

components of computer programs are considered objects

  • objects have state, behavior, identity
  • Guidelines and practices to maintain

this abstraction intelligently

slide-22
SLIDE 22

Designing a Car Racing Game

  • Daunting at first, but identify the objects
  • Car objects and a Track object interact with

a Physics object

  • then decide responsibilities of classes
  • Car stores velocity, size, location. Controls
  • Track stores boundaries, start, finish
  • Physics determines collisions, adjusts

momentum

slide-23
SLIDE 23

The Wisdom of OOP

  • Breaking down the program into pieces

provides bite-sized goals

  • By generalizing programs to object

interactions, common patterns appear

  • Want different types of tracks?

Inheritance and polymorphism

slide-24
SLIDE 24

Reading

  • Course website/syllabus
  • Survey
  • Academic honesty policy
  • Horstmann Ch. 1 - Java review