1004-1 (3)

Upload: michaelmooreny

Post on 02-Jun-2018

234 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/10/2019 1004-1 (3)

    1/16

    COMS W1004Introduction to Computer Science

    and Programming in Java

    Instructor: Adam Cannon

  • 8/10/2019 1004-1 (3)

    2/16

    Lecture 1: Introduction

    Course objectives

    Course information

    Textbooks

    Syllabus

    Assignments and Grading

    Academic Honesty

    Preliminary Definitions

    Linear Search Pseudocode

    Reading

  • 8/10/2019 1004-1 (3)

    3/16

    Course Objectives

    Java programming Skills

    Knowledge of the fundamental concepts incomputer science

    Algorithmic problem solving capabilities

  • 8/10/2019 1004-1 (3)

    4/16

    Course Information

    Course information may be found on courseworks at:

    https://courseworks.columbia.edu

    Please look there for answers to your questionsand make use of the Piazza discussion board.

    https://courseworks.columbia.edu/https://courseworks.columbia.edu/
  • 8/10/2019 1004-1 (3)

    5/16

    Textbooks

    We will use two textbooks in this course. Both are

    Available at the Columbia University Bookstore

    in Lerner Hall.

    Big Java Late Objects (1st Edition) by Cay Horstmann

    Invitation to Computer Science(6th Edition)

    by G. Michael Schneider and Judith L. Gersting

  • 8/10/2019 1004-1 (3)

    6/16

    Syllabus

    Introduction to algorithms and algorithmic problem solving

    Java basics

    Using classes in Java

    Iteration and conditionals in Java

    Boolean logicand elementary circuit construction

    Introduction to Computer Organization Midterm

    Software testing

    Arrays and Array Lists

    Computer Networks

    Beyond the basics in Java programming: Interfaces

    Inheritance

    I0 and exceptions

    Models of Computation

  • 8/10/2019 1004-1 (3)

    7/16

    Assignments and Grading

    There will be 5 to 6 two-part homework

    assignments. Your grade will be

    determined using the following guideline:

    35% homework

    25% midterm exam (October 22)

    40% final exam

  • 8/10/2019 1004-1 (3)

    8/16

    Academic Honesty

    You are encouraged to verbal ly discusstheclassroom material and homework problemsamong yourselves, the TAs and the instructor.

    You are expected to write-upthe problem setsand do all programming by yourself

    Do not copy anyone elses work

    HTTP://www.cs.columbia.edu/education/honestyfor a description of the departments academic

    honesty policy

    http://www.cs.columbia.edu/education/honestyhttp://www.cs.columbia.edu/education/honesty
  • 8/10/2019 1004-1 (3)

    9/16

    Emerging Scholars Program

    Learn about CS as a problem solving

    discipline.

    See the Big Picture

    1-point class, no programming

    Because its where the cool kids hang out

    http://www.cs.columbia.edu/esp/

  • 8/10/2019 1004-1 (3)

    10/16

    Preliminary Definitions

    Algorithm:

    Dictionary Definition: A procedure for solving a mathematical

    problem in a finite number of steps that frequently involvesrepetition of an operation; broadly: a step-by-step method of

    accomplishing some task.

  • 8/10/2019 1004-1 (3)

    11/16

    Preliminary Definitions

    Algorithm:

    Textbook Definition: A well-ordered collection of

    unambiguous and effectively computable operationsthat when executed produces a result and halts in a finite

    amount of time.

  • 8/10/2019 1004-1 (3)

    12/16

    Preliminary Definitions

    Computer Science

    Textbook Definition: The study of algorithms including

    Their formal and mathematical properties

    Their hardware realizations

    Their linguistic realizations

    Their applications

  • 8/10/2019 1004-1 (3)

    13/16

    Your first Algorithm

    Linear Search: (also called sequential search)

    Algorithm to determine whether a given namexappears

    on a list.

    Input:A list of n1 names A[1], A[2], ... , A[n],

    and a given namex.

    Output.The message "Sorry, x is not on the list" if x is noton the list.

    Otherwise, the message: "x occurs at position i on the list."

  • 8/10/2019 1004-1 (3)

    14/16

    Pseudocode

    Aprogramming languageis a notation for specifyinginstructions that a computer can execute

    Every (programming) language has a syntax and asemantics Syntaxspecifies how something is said (grammar)

    Semanticsspecifies what it means

    Pseudocodeis an informal programming language withEnglish-like constructs modeled to look like statementsin a Java-like language

    Anyone able to program in any computer languageshould understand how to read pseudocode instructions.

    When in doubt just write it out in English.

  • 8/10/2019 1004-1 (3)

    15/16

    Your first AlgorithmHere are the instructions for linear search written in

    pseudocode:

    found = "no";

    i=1;

    while (found == "no" and i

  • 8/10/2019 1004-1 (3)

    16/16

    Reading

    Chapters 1 and 2 in Schneider and Gersting