Download presentation
Presentation is loading. Please wait.
1
COMS W1004 Introduction to Computer Science June 29, 2009
2
Announcements Please fill out the course evaluation in CourseWorks (check your Columbia email 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!!
3
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
4
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
5
Final Exam Rules No books No notes No calculators No cellphones, etc. No cheating No crying
6
Format of the exam 10-15 “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
7
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
8
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!
9
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
10
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)
11
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)
12
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
13
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?
14
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!)
15
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?
16
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!
17
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
18
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
19
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
20
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
21
Java Basics (Big Java ch.1 & 4) Declaration, instantiation, and assignment of variables Math operators & operator precedence Data conversion & casting Java compilation process
22
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
23
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
24
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
25
Conditionals and Loops (Big Java ch.5-6) Comparing primitives vs. comparing objects if, if/else for, while, do/while Scope of variables
26
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
27
Exceptions (Big Java ch.11) What are exceptions? try/catch blocks Reading text files
28
Software Testing Unit Testing –Whitebox: test according to the program –Blackbox: test according to the specification System Testing
29
Recursion Writing recursive methods Examples of recursion –Factorial –Fibonacci series
30
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
31
Format of the exam 10-15 “concept” questions 5-6 problem solving questions 1-2 “Find the bugs” questions Writing Java code Understanding Java code
32
Review topics for today Clarification of some of the terms Substrings Boolean circuits (S&G 4)
33
Terms from the list SASD: Sequential Access Storage Device (S&G page 202) JVM: Java Virtual Machine Ignore these: –Polymorphism –White space
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.