======Object Oriented Programming - Lecture 2016/2017====== This page contains materials for the first half of lectures for [[https://is.cuni.cz/studium/rozvrhng/roz_predmet_gl.php?gl=16aNMIN201p1&fak=11320&skr=2016&sem=1|Object Oriented Programming (NMIN201)]] course that is being/has been taught during winter semester 2016/2017 at [[http://www.mff.cuni.cz/|Charles University]] in [[http://www.praha.eu/jnp/cz/home/magistrat/index.html|Prague]], Czech Republic. The first half will be dedicated to C language and we will tenderly touch C++. These lectures will be given by me ([[http://gamedev.cuni.cz/contacts/|Jakub Gemrot]]). Web page containing information about lectures from previous year [[http://kam.mff.cuni.cz/~perm/programovani/NMIN201/index.html|WS 2015/2016]] is here (led by Martin Pergel). First half of the lecture will be based on slides from there. The second half of lectures (about C# language) will be led by Tomáš Holan and corresponding web page should have been found [[http://ksvi.mff.cuni.cz/~holan/|here]]. Permalink: [[http://bit.ly/mff-uk-oop-lecture-2016|http://bit.ly/mff-uk-oop-lecture-2016]] Link to the "future": [[http://bit.ly/mff-uk-oop-lecture-2017|http://bit.ly/mff-uk-oop-lecture-2017]] ======Dates====== Thursday's lecture, 14:00, [[https://is.cuni.cz/studium/rozvrhng/roz_budova_macro.php?skr=2016&sem=1&fak=11320&budova=NKAR&den=4|K4]]. You can contact me at any time: [[mailto:jakub.gemrot@gmail.com|jakub.gemrot@gmail.com]] ======Lectures====== =====L01 - 6.10.2016===== **Topic: Introduction to C Part 1** Details: * History of language C, Pascal vs. C (types, comments, procedures and functions, operators, return) Slides: [[https://drive.google.com/open?id=0B49ID9s3-zhTMFlSR09jV1dCLWM|PDF 1]] (courtesy of Martin Pergel) * We've been through first 22 slides Useful: * [[http://www.cs.gordon.edu/courses/cs320/handouts/C_C++_Syntax_vs_Pascal.html|Comparison of syntax Pascal vs. C/C++]] * Turned into handouts that compare Pascal and (ANSI) C syntax * [[https://drive.google.com/open?id=0B49ID9s3-zhTNTFPX0RNVVRZU2M|Handout 1]] - Constants, Variables, Types, Pointers * [[https://drive.google.com/open?id=0B49ID9s3-zhTeF85akFJcGtISmM|Handout 2]] - Procedures, Functions, Program * [[https://drive.google.com/open?id=0B49ID9s3-zhTMFVVRWpmRExWaEk|Handout 3]] - Operators and Expressions * [[https://drive.google.com/open?id=0B49ID9s3-zhTRUJINnl5VVA2Vms|Handout 4]] - Executables and Statements =====L02 - 13.10.2016===== **Topic: Introduction to C Part 2** Details: * if, for, while, do-while, switch, header files, stdio.h, getchar, printf, introduction to pointers and low-level access to the memory Slides: * [[https://drive.google.com/open?id=0B49ID9s3-zhTMFlSR09jV1dCLWM|PDF 1]] (courtesy of Martin Pergel) * slides 23-39 * [[https://drive.google.com/open?id=0B49ID9s3-zhTNzRNSEpnSGtxejA|PDF 2]] (courtesy of Martin Pergel) * slides 01-18 Useful: * [[http://stackoverflow.com/questions/31736361/visual-studio-2015-gives-me-errors-upon-creating-a-simple-test-console-program|Where is stdio.h]] * You might encounter a problem including stdio.h into your .c file in VS2015 * In this case, read the discussion above and follow the solution =====L03 - 20.10.2016===== **Topic: Introduction to C Part 3** Details: * pointers reloaded - m/r/c-alloc, free, strlen/cmp/cpy/ncmp/ncpy, memcpy; struct, union, linked lists * file handling, preprocessor Slides: * [[https://drive.google.com/open?id=0B49ID9s3-zhTNzRNSEpnSGtxejA|PDF 2]] (courtesy of Martin Pergel) * slides 19-74 * [[https://drive.google.com/open?id=0B49ID9s3-zhTRmFpZERfY2dRN00|PDF 3]] (courtesy of Martin Pergel) * slides 01-06 Useful: * [[https://www.tutorialspoint.com/cprogramming/c_memory_management.htm|m/r/c-allock and free]] * another explanations of what we are going to cover in the lecture * [[http://www.learn-c.org/en/Linked_lists|Linked List in C]] * we will create our own during the lecture =====L04 - 27.10.2016===== **Topic: Introduction to C Part 4, Introduction to C++ Part 1** Details: * preprocessor, variable argument list * C++ intro - classes, methods, fields, overloaded methods, constructors, destructors Slides: * [[https://drive.google.com/open?id=0B49ID9s3-zhTRmFpZERfY2dRN00|PDF 3]] (courtesy of Martin Pergel) * slides 07-13 * [[https://drive.google.com/open?id=0B49ID9s3-zhTRGFoLXliOXM5cDg|PDF 4]] (courtesy of Martin Pergel) * slides 01-11 =====L05 - 3.11.2016===== **Topic: Introduction to C++ Part 2** Details: * C++ - constructors, destructors, de/allocations, inheritance, statics, virtual methods Slides: * [[https://drive.google.com/open?id=0B49ID9s3-zhTRGFoLXliOXM5cDg|PDF 4]] (courtesy of Martin Pergel) * slides 12-14 * [[https://drive.google.com/open?id=0B49ID9s3-zhTenlkS1g0TGFyWVE|PDF 5]] (courtesy of Martin Pergel) * slides 01-04 =====L06 - 10.11.2016===== **Topic: Introduction to C++ Part 3** Details: * C++ - abstract classes (pure virtual functions), operators, streams, templates Slides: * [[https://drive.google.com/open?id=0B49ID9s3-zhTenlkS1g0TGFyWVE|PDF 5]] (courtesy of Martin Pergel) * slides 05-13 * [[https://drive.google.com/open?id=0B49ID9s3-zhTS21nVG1ETW4wOVU|PDF 6]] (courtesy of Martin Pergel) **Dis is one half. FOLKS!**