CS 100, Summer 2001 Monday, 6/25 Lecture 1 ---------------------------------------------------------------------- Introduction: + Welcome to CS 100! + Instructor: Kiri Wagstaff + TAs (Ben, Jay, Hongjie) + Consultants (Jason, Radha, Sada) Announcements: + Important dates (see Info handout / website) + Kiri out of town Friday (TA Review); Friday office hour moves to Thursday (11:30 - 12:30, 4139 Upson) + Get handouts (survey, course info) + Survey due Tuesday, 6/26 + Exercise 1 due Tuesday, 6/26 + Assignment 1 due Thursday, 6/28 + reading: Savitch Chapter 1 and 2 (see Syllabus for details) ---------------------------------------------------------------------- Topics: + course mechanics + fundamental programming concepts - definition of programming - how programming works - problem solving - algorithms + computer languages ---------------------------------------------------------------------- Course Procedures: + attend five lectures a week + Fridays are usually TA Review days (at least partially) - you are responsible for material covered there as well. + 4 assignments - practice a variety of concepts + 2 projects - longer assignments; practice for programming on your own + 15 exercises - short, fewer points, mandatory (graded) + 2 prelims and final + books: - Savitch required - all others optional ---------------------------------------------------------------------- Computer Rudiments: + hardware: physical components of a computer + software: "the intelligence" that runs the hardware + memory: "space" inside a computer to store information + file: collection of information with a name + directory: collection of files + folder: same as directory + path: location of file or directory starting from the "uppermost" directory + Program: file composed of instructions using a computer language + Interpreting: computer reads each line of code and acts up it before acting upon the next line + Compiling: process of converting code into an unreadable format - condensed - can create "runnable" (executable) files that quickly run your programs + Input: any information you supply to a program + Output: any information reported by a program ----------------------------------------------------------------------- Process of Programming + turning a problem into a solution + in-between step is called algorithm design - break solution down into sequence of steps - each step is an instruction - the performer of instructions must be able to follow the instructions! - may have to keep breaking down steps - final algorithm is a program in "words" + definition: "Programming is automated problem solving" + example: think recipe - someone else wrote a sequence of instructions - used terms that are accepted and have known values/meanings - you, the human, act on the instructions + consider your audience: a dumb computer ---------------------------------------------------------------------- Computer Language + need to translate English language algorithm into a computer language + many options: MATLAB, Maple, Java, C, C++, etc + use MATLAB and Java for CS100 ---------------------------------------------------------------------- Language Elements + has syntax (grammar) and semantics (meaning) + characters -> tokens -> statements -> programs ---------------------------------------------------------------------- Example: + CircleCalculation.java + outline structure of .java file + SavitchIn (list of useful methods on p. 95) ---------------------------------------------------------------------- Tokens: + White Space: blanks, tabs, new lines + Comments: (ignored by Java compiler) - single line: // I am a comment /* I am a comment */ - multiline: /* blah blah blah blah blah blah */ /* * This version is more aesthetically pleasing */ ---------------------------------------------------------------------- + Identifiers: names for things in code - more later! -------------------------------------------------------------------- Pick up as you go out: Exercise 1 (algorithm intro) Assignment 1