COMS W1004 Introduction to Computer Science June 29, 2009.

Slides:



Advertisements
Similar presentations
Assembly Language for Intel-Based Computers, 4 th Edition Chapter 1: Basic Concepts (c) Pearson Education, All rights reserved. You may modify and.
Advertisements

Defining classes and methods Recitation – 09/(25,26)/2008 CS 180 Department of Computer Science, Purdue University.
COMS S1007 Object-Oriented Programming and Design in Java July 8, 2008.
COSC 120 Computer Programming
Chapter 41 Defining Classes and Methods Chapter 4.
COMS W1004 Introduction to Computer Science June 24, 2009.
COMS W1004 Introduction to Computer Science June 15, 2009.
1 Chapter 4 Language Fundamentals. 2 Identifiers Program parts such as packages, classes, and class members have names, which are formally known as identifiers.
COMS W1004 Introduction to Computer Science June 25, 2008.
COMP 14 Introduction to Programming Mr. Joshua Stough February 7, 2005 Monday/Wednesday 11:00-12:15 Peabody Hall 218.
Wednesday, 12/11/02, Slide #1 CS 106 Intro to Comp. Sci. 1 Wednesday, 12/11/02  QUESTIONS??  Today: CLOSING CEREMONIES!  HW #5 – Back Monday (12/16)
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. COMPSCI 125 Introduction to Computer Science I.
COMP 14 Introduction to Programming Miguel A. Otaduy May 18, 2004.
COMS W1004 Introduction to Computer Science June 11, 2008.
COMS S1007 Object-Oriented Programming and Design in Java August 12, 2008.
COMS W1004 Introduction to Computer Science June 1, 2009.
COMS S1007 Object-Oriented Programming and Design in Java August 7, 2007.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. COMPSCI 125 Introduction to Computer Science I.
COMS W1004 Introduction to Computer Science June 17, 2009.
COMS W1004 Introduction to Computer Science June 4, 2008.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie COMP 14 Introduction to Programming Adrian Ilie June 27, 2005.
Outline Chapter 1 Hardware, Software, Programming, Web surfing, … Chapter Goals –Describe the layers of a computer system –Describe the concept.
COMS W1004 Introduction to Computer Science June 9, 2008.
COMS S1007 Object-Oriented Programming and Design in Java July 3, 2007.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie COMP 14 Introduction to Programming Adrian Ilie June 30, 2005.
Final Exam Review Instructor : Yuan Long CSC2010 Introduction to Computer Science Apr. 23, 2013.
Intro to CS – Honors I Introduction GEORGIOS PORTOKALIDIS
Announcements Homework #8 due Monday 6:00pm. – extra credit tasks are described at bottom of assignment page Upcoming office hours: – Tomorrow: Sheng 12-1:30pm,
Imperative Programming
CIS Computer Programming Logic
Peter Andreae Computer Science Victoria University of Wellington Copyright: Peter Andreae, Victoria University of Wellington Summary and Exam COMP 102.
CSU0014 Assembly Languages Homepage: Textbook: Kip R. Irvine, Assembly Language for Intel-Based Computers,
Computer Systems Organization CS 1428 Foundations of Computer Science.
Lecture 2 Object Oriented Programming Basics of Java Language MBY.
Basics of Java IMPORTANT: Read Chap 1-6 of How to think like a… Lecture 3.
COMP Recursion, Searching, and Selection Yi Hong June 12, 2015.
Hello.java Program Output 1 public class Hello { 2 public static void main( String [] args ) 3 { 4 System.out.println( “Hello!" ); 5 } // end method main.
1 © 2002, Cisco Systems, Inc. All rights reserved. Arrays Chapter 7.
JAVA 0. HAFTA Algorithms FOURTH EDITION Robert Sedgewick and Kevin Wayne Princeton University.
Summary of what we learned yesterday Basics of C++ Format of a program Syntax of literals, keywords, symbols, variables Simple data types and arithmetic.
CS 112 Department of Computer Science George Mason University CS 112 Department of Computer Science George Mason University Final Review Lecture 14.
Programming for Beginners Martin Nelson Elizabeth FitzGerald Lecture 15: More-Advanced Concepts.
CS 206 Introduction to Computer Science II 09 / 10 / 2009 Instructor: Michael Eckmann.
CMSC 2021 CMSC 202 Computer Science II for Majors Fall 2002 Mr. Frey (0101 – 0104) Mr. Raouf (0201 – 0204)
Java Programming: From Problem Analysis to Program Design, 4e Chapter 2 Basic Elements of Java.
Java Programming: From Problem Analysis to Program Design, 5e Chapter 2 Basic Elements of Java.
Object-Oriented Program Development Using Java: A Class-Centered Approach, Enhanced Edition.
1 Chapter 3 Syntax, Errors, and Debugging Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
Chapter 3 Syntax, Errors, and Debugging Fundamentals of Java.
CSC 1051 – Data Structures and Algorithms I Dr. Mary-Angela Papalaskari Department of Computing Sciences Villanova University Course website:
ICT Introduction to Programming Chapter 4 – Control Structures I.
School of Computer Science & Information Technology G6DICP - Lecture 4 Variables, data types & decision making.
CS1101 Group1 Discussion 10 Lek Hsiang Hui comp.nus.edu.sg
CMSC 2021 CMSC 202 Computer Science II for Majors Spring 2002 Sections Ms. Susan Mitchell.
CMSC 2021 CMSC 202 Computer Science II for Majors Spring 2001 Sections Ms. Susan Mitchell.
CMSC 2021 CMSC 202 Computer Science II for Majors Spring 2003 Mr. Frey (0101 – 0104) Mr. Raouf (0201 – 0204)
CSCI 1226 FALL 2015 MIDTERM #1 REVIEWS.  Types of computers:  Personal computers  Embedded systems  Servers  Hardware:  I/O devices: mice, keyboards,
Spring 2009 Programming Fundamentals I Java Programming XuanTung Hoang Lecture No. 8.
Chapter 1 Java Programming Review. Introduction Java is platform-independent, meaning that you can write a program once and run it anywhere. Java programs.
WELCOME To ESC101N: Fundamentals of Computing Instructor: Ajai Jain
Announcements Assignment 2 Out Today Quiz today - so I need to shut up at 4:25 1.
CS 1428 Final Exam Review. Exam Format 200 Total Points – 60 Points Writing Programs – 45 Points Tracing Algorithms and determining results – 20 Points.
Computer Organization Exam Review CS345 David Monismith.
Information and Computer Sciences University of Hawaii, Manoa
Chapter 4 Assignment Statement
Final exam: Wednesday, March 20, 2:30pm
Chapter 3 Assignment Statement
Review for Exam 1 Spring 2007 CS 101/CS 101-E.
CS 1428 Final Exam Review.
Dr. Clincy Professor of CS
Presentation transcript:

COMS W1004 Introduction to Computer Science June 29, 2009

Announcements Please fill out the course evaluation in CourseWorks (check your Columbia for more information) –Describe your experience with the research project in the Strengths/Weaknesses section –Evaluate the TA with whom you’re most familiar Also check that the grades in CourseWorks match those on your returned papers!!

Final Grades and Such We’re hoping to have everything graded by this weekend You can pick up homework submissions and see your graded final exam next Tuesday (July 7) from 12-5pm in 608 CEPSR Final grades will be submitted to the registrar next Tuesday night

Final Exam Logistics Wednesday, 5:40-8:40pm (note the start time) Big Java chapters 1-7 –Except the brown “testing” and purple “graphics” sections Big Java sections 11.1, 11.4, and 11.5 S&G chapters 1-7 Anything discussed in class, including example Java code posted on the website –Except for student research presentations

Final Exam Rules No books No notes No calculators No cellphones, etc. No cheating No crying

Format of the exam “concept” questions 5-6 problem solving questions 1-2 “Find the bugs” questions Writing Java code Understanding Java code Last year: 71% Java, 29% theory

Studying for the exam Review your class notes and try to anticipate “problem solving”-type questions Make sure you understand the source code that we looked at in class and in the textbook Review the homework solutions!! Look at the types of questions at the ends of the chapters in the assigned readings

Taking the exam Note how much each question is worth Look through the entire exam and start by working on problems that you think you can do quickly and that are worth a lot of points Read the instructions carefully!

More advice Concept questions –Don’t write too much, but try to be detailed –Each question is looking for 2-3 major points –Give an example if you can’t explain it Problem-solving questions –ALWAYS show your work to try to get partial credit –Check your solution if possible

More advice Understanding Java code –Show the results of intermediate steps Writing Java code –You are graded on accuracy of syntax and semantics (your code must “compile”) –Try to use good style (e.g. naming conventions)

More advice “Find the bugs” question –Look for compile-time (syntax, semantic) errors before trying to find logic errors –Be sure it’s a bug (look out for tricks)

Basic Concepts (S&G 1) What is Computer Science? What is an Algorithm? Pseudocode –You will not be asked to write pseudocode but you should be able to look at an algorithm and understand it

Examples of Algorithms (S&G 2) Searching (Sequential and Binary) –Worst case number of comparisons –Average number of comparisons –Which numbers are compared Sorting (Selection and Insertion) –Which numbers are compared/swapped? –What does the array look like after each loop?

Comparing Algorithms (S&G 3) What does Big-Oh notation mean? Constant O(1) Logarithmic O(log n) Linear O(n) Quadratic O(n 2 ) Exponential O(2 n ) Factorial O(n!)

Binary Numbers (S&G 4) Decimal, binary, and hexadecimal numbers –Representation –Conversion Negative numbers in binary Encoding –How many things can you represent with N bits? –How many bits do you need to represent X things?

Boolean Logic (S&G 4) Truth tables Boolean expressions Transistors, gates, and circuits –Basic gates: OR, AND, NOT Some of this was not covered in class but you should still know this material!

Von Neumann Architecture (S&G 5) Memory –Volatile vs. Non-volatile storage –Address space (maximum memory size) –Address vs. Data; MAR & MDR –Caching I/O Devices –DASD vs. SASD Control Unit –CPU: fetch, decode, execute –ALU: circuits for math operations

Assembly Language (S&G 6) Fundamental operations –Data transfer: LOAD, STORE –Math: ADD, SUBTRACT –Compare: COMP –Branch: JUMP, JUMPGT Converting Java to assembly language Machine language representation

Operating Systems (S&G 6) OS History: batch, multiprogrammed, etc. OS responsibilities: –UI management –System/file access control –Program scheduling –Resource allocation –Deadlock/error detection & avoidance

Networking (S&G 7) Network protocol stack 1.Physical: how is it sent? 2.Data Link: how do we know it got there? 3.Network: where is it going? what route does it take? 4.Transport: which mailbox does it go to? 5.Application: what’s inside the envelope? Graphs Dijkstra’s Algorithm Wireless networking

Java Basics (Big Java ch.1 & 4) Declaration, instantiation, and assignment of variables Math operators & operator precedence Data conversion & casting Java compilation process

Java Datatypes (Big Java p.135) byte8 bits short2 byte integer int4 byte integer long8 byte integer float4 byte floating-point double8 byte floating-point char2 byte character booleantrue or false

Object-oriented Programming (Big Java ch.2-3) Classes vs. Objects –Attributes –Methods –Constructors Encapsulation –public and private Calling methods –arguments and parameters Static variables and methods

Java API Math: pow, sqrt, etc. Random: nextInt, nextDouble, etc. Scanner: hasNext, next, nextLine, nextInt, etc. String –indexOf, charAt, length –endsWith, startsWith, contains, equals –toUpperCase, toLowerCase –replace, substring

Conditionals and Loops (Big Java ch.5-6) Comparing primitives vs. comparing objects if, if/else for, while, do/while Scope of variables

Arrays (Big Java ch.7) All elements must be of the same type Fixed length Arrays are objects Declaring, initializing, and using arrays Array bounds checking Command-line arguments

Exceptions (Big Java ch.11) What are exceptions? try/catch blocks Reading text files

Software Testing Unit Testing –Whitebox: test according to the program –Blackbox: test according to the specification System Testing

Recursion Writing recursive methods Examples of recursion –Factorial –Fibonacci series

Final Exam Logistics Wednesday, 5:40-8:40pm (note the start time) Big Java chapters 1-7 –Except the brown “testing” and purple “graphics” sections Big Java sections 11.1, 11.4, and 11.5 S&G chapters 1-7 Anything discussed in class, including example Java code posted on the website –Except for student research presentations

Format of the exam “concept” questions 5-6 problem solving questions 1-2 “Find the bugs” questions Writing Java code Understanding Java code

Review topics for today Clarification of some of the terms Substrings Boolean circuits (S&G 4)

Terms from the list SASD: Sequential Access Storage Device (S&G page 202) JVM: Java Virtual Machine Ignore these: –Polymorphism –White space