1 / 12

Course Introduction

Course Introduction. CS 1037 Fundamentals of Computer Science II. Course Info. Subject: C++, data structures, algorithms Marks: 20% assignments + 5% weekly labs 30% midterm + 45% final People: Andrew, Mohsin, Ganesh, Da, Anthony, Jenny

saddam
Download Presentation

Course Introduction

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. Course Introduction CS 1037 Fundamentals of Computer Science II

  2. Course Info • Subject: • C++, data structures, algorithms • Marks: • 20% assignments + 5% weekly labs • 30% midterm + 45% final • People: • Andrew, Mohsin, Ganesh, Da, Anthony, Jenny • Assignments, labs, announcements… http://www.csd.uwo.ca/courses/CS1037a/

  3. You Should Already Know… • Variables, built-in types • Arrays (just the basics) • Functions, if-else, loops intnum_students = 68; intgrades[68]; grades[7] = -100; // die cheater die intaverage_grade() { intsum = 0; for (inti = 0; i < num_students; ++i) sum += grades[i]; return sum / num_students;}

  4. You'll Learn… Lots More C++ • Pointers & References • Templates • Classes int* b = &a; // b points to a int& c = a; // c refers to a intmax(int a, int b) { // works only for int if (a < b) return b; else return a; } template <typenameT> T max(T a, T b) { // works for any type (int, float, char) if (a < b) return b; else return a; } class circle { point center; int radius; void draw(); };

  5. You'll Learn… Data Structures • Dynamic Arrays • Linked Lists • Stacks, Queues • Trees dynarray<int> grades(num_students); grades[7] = -100; // die cheater die linkedlist<int> courses; courses.push_front(1037); queue<char> keys; keys.push_back('A'); binarytree<string> presidents; presidents.insert("Obama");

  6. You'll Learn… Algorithms • Sorting • Searching • Asymptotic Analysis (what do you mean by “fast”?) int prices[4] = { 8, 15, 1, 10 }; sort(prices, prices+4); // prices = { 1, 8, 10, 15 } int pos = binary_search(prices, prices+4, 10); // pos = 2 O(1) O(logn) O(n) O(n2) O(2n) means “fast” time n # items means “slow”

  7. Programming Skills Take Time! CS2210 SE2205 CS1037 effectiveness of you CS1036 stuff in your brain variables if-else loops arrays pointers functions structs classes templates sorting lists/queues trees graphs hashing more…

  8. distributed computing computability theory operating systems Big Universe of Ideas! optimization networking virtual machines compilers data mining user interfaces parsing C C# version control interpreters file I/O Java symbolic computation Python debugging UML rasterization polymorphism multisets profiling exceptions assertions inheritance physics simulation dictionaries portability templates variables structs linear algebra balanced trees hashing databases if-else iterators loops classes security matching arrays pointers encapsulation stacks float arithmetic searching lists functions sorting threads recursion concurrency clustering references queues assembly trees compression heaps combinatorics finite automata graphs caching big-O greedy algorithms GPUs proof techniques NP-completeness backtracking randomized algorithms dynamic programming approximation algorithms reducibility

  9. Language Popularity in 2010 source: http://www.langpop.com/

  10. BjarneStroustrup on C++ “Within C++, there is a much smaller and cleaner language struggling to get out.” “And no, that smaller and cleaner language is not Java or C#.” a fan Stroustrup started designing C++ in 1979, and is still working on it!

  11. Goals of CS 1037 • Understand how to… • use data structures • implementdata structures • characterize an algorithm’s performance • express computation in C++ • Develop intuition about… • best data structure / algorithm for situation • good code, poor code, and dangerous code • Programming experience, confidence

  12. Programmer Test Q: What does this statement do? • Question was strong predictor of success on 1988 Advanced Placement exam... b = b == false; "unusual patterns that emerged from a statistical analysis of the 1988 Advanced Placement Exam in Computer Science” —Stuart Reges, University of Washington

More Related