1 / 11

COMS W1004 Introduction to Computer Science and Programming in Java

COMS W1004 Introduction to Computer Science and Programming in Java. Columbia University Fall 2018. Lecture 1: Introduction. Course objectives Course information Textbooks Syllabus Assignments and Grading Academic Honesty Preliminary Definitions Linear Search Pseudocode Reading.

jpalazzolo
Download Presentation

COMS W1004 Introduction to Computer Science and Programming in Java

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. COMS W1004Introduction to Computer Science and Programming in Java Columbia University Fall 2018

  2. Lecture 1: Introduction • Course objectives • Course information • Textbooks • Syllabus • Assignments and Grading • Academic Honesty • Preliminary Definitions • Linear Search • Pseudocode • Reading

  3. Course Objectives • Java programming Skills • Knowledge of the fundamental concepts in computer science • Algorithmic problem solving capabilities

  4. Course Information Course website: www.cs.columbia.edu/~cannon/1004/ Course information may be found on courseworks at: courseworks.columbia.edu Please look there for answers to your questions and make use of the Piazza discussion board.

  5. Preliminary Definitions Algorithm: Dictionary Definition: A procedure for solving a mathematical problem in a finite number of steps that frequently involves repetition of an operation; broadly: a step-by-step method of accomplishing some task.

  6. Preliminary Definitions Algorithm: Textbook Definition: A well-ordered collection of unambiguous and effectively computable operations that when executed produces a result and halts in a finite amount of time.

  7. 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. Your first Algorithm Linear Search: (also called sequential search) Algorithm to determine whether a given name x appears on a list. Input: A list of n ≥1 names A[1], A[2], ... , A[n], and a given name x. Output. The message "Sorry, x is not on the list" if x is not on the list. Otherwise, the message: "x occurs at position i on the list."

  9. Pseudocode • A programming language is a notation for specifying instructions that a computer can execute • Every (programming) language has a syntax and a semantics • Syntax specifies how something is said (grammar) • Semantics specifies what it means • Pseudocode is an informal programming language with English-like constructs modeled to look like statements in a Java-like language • Anyone able to program in any computer language should understand how to read pseudocode instructions. • When in doubt just write it out in English.

  10. Your first Algorithm Here are the instructions for linear search written in pseudocode: found = "no"; i=1; while (found == "no" and i <= n) { if (A[i] == x) { found = "yes"; location = i; } i++; } if (found == "no") { print ("Sorry, " + x + " is not on the list"); } else { print (x + " occurs at position " + location + " on the list"); }

  11. Reading Chapters 1 and 2 in Schneider and Gersting

More Related