{"id":13,"date":"2015-09-09T23:04:48","date_gmt":"2015-09-09T23:04:48","guid":{"rendered":"http:\/\/www.sqrlab.ca\/csci1060u\/?page_id=13"},"modified":"2020-12-06T02:16:48","modified_gmt":"2020-12-06T02:16:48","slug":"lectures","status":"publish","type":"page","link":"https:\/\/www.sqrlab.ca\/csci1060u\/lectures\/","title":{"rendered":"Lectures"},"content":{"rendered":"<ul>\n<li><a href=\"#L1\">Lecture 1:\u00a0Introduction to C++<\/a><\/li>\n<li><a href=\"#L2\">Lecture 2: Data Types Variables &amp; Type Casting<\/a><\/li>\n<li><a href=\"#L3\">Lecture 3: Branching<\/a><\/li>\n<li><a href=\"#L4\">Lecture 4: Looping<\/a><\/li>\n<li><a href=\"#L5\">Lecture 5: Functions I<\/a><\/li>\n<li><a href=\"#L6\">Lecture 6: Functions II<\/a><\/li>\n<li><a href=\"#L7\">Lecture 7: File I\/O I<\/a><\/li>\n<li><a href=\"#T1\">Test 1: Lectures 1-7<\/a><\/li>\n<li><a href=\"#L8\">Lecture 8: File I\/O II<\/a><\/li>\n<li><a href=\"#L9\">Lecture 9: Code Style and Documentation<\/a><\/li>\n<li><a href=\"#L10\">Lecture 10: Namespaces<\/a><\/li>\n<li><a href=\"#L11\">Lecture 11: Problem Solving in C++ I (Connect 4)<\/a><\/li>\n<li><a href=\"#L12\">Lecture 12: Problem Solving in C++ II (Connect 4)<\/a><\/li>\n<li><a href=\"#L13\">Lecture 13: Pointers in C++ I<\/a><\/li>\n<li><a href=\"#L14\">Lecture 14: Pointers in C++ II<\/a><\/li>\n<li><a href=\"#T2\">Test 2: Lectures 1-14 (emphasis on 8-14)<\/a> &#8211; Monday, November 9, 2020<\/li>\n<li><a href=\"#L15\">Lecture 15: Dynamic Variables<\/a><\/li>\n<li><a href=\"#L16\">Lecture 16: Dynamic Arrays<\/a><\/li>\n<li><a href=\"#L17\">Lecture 17: Classes in C++ I<\/a><\/li>\n<li><a href=\"#L18\">Lecture 18: Classes in C++ II<\/a><\/li>\n<li><a href=\"#L19\">Lecture 19: Implementing a Stack in C++<\/a><\/li>\n<li><a href=\"#L20\">Lecture 20: Implementing a Linked List in C++ I<\/a><\/li>\n<li><a href=\"#L21\">Lecture 21: Implementing a Linked List in C++ II<\/a><\/li>\n<li><a href=\"#T3\">Test 3: Lectures 1-21 (emphasis on 15-21)<\/a> &#8211; Monday, December 7, 2020<\/li>\n<\/ul>\n<h3>Lecture 1: Introduction to C++<\/h3>\n<ul>\n<li>A first introduction to programming in C++. We will learn how to compile and run C++ programs from the command-line in Linux.<\/li>\n<li><em>Slides:<\/em> <a href=\"https:\/\/www.sqrlab.ca\/lectures\/csci1060u-f20\/CSCI1060U_Lecture_01.pdf\">[PDF]<\/a><\/li>\n<li><em>Video:<\/em> No video available<\/li>\n<li><em>Exercises:<\/em>\n<ul>\n<li><a href=\"https:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/helloclass.cpp\">helloclass.cpp<\/a> &#8211; a first C++ program.<\/li>\n<\/ul>\n<\/li>\n<li>References:\n<ul>\n<li><a href=\"http:\/\/gcc.gnu.org\/onlinedocs\/gcc-3.4.6\/gcc\/G_002b_002b-and-GCC.html\">G++ and GCC &#8211; Using the GNU Compiler Collection (GCC)<\/a><\/li>\n<li><a href=\"http:\/\/pages.cs.wisc.edu\/~beechung\/ref\/gcc-intro.html\">Compiling C and C++ Programs<\/a><\/li>\n<li>Code editors: <a href=\"https:\/\/atom.io\/\">Atom<\/a> and\u00a0<a href=\"https:\/\/code.visualstudio.com\/\">Visual Studio Code<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3><a name=\"L2\"><\/a>LECTURE 2: Data Types, Variables &amp; Type Casting<\/h3>\n<ul>\n<li>Today we will learn the basics of writing C++ programs including input\/output, data types and variables and type casting.<\/li>\n<li><em>Slides:<\/em> <a href=\"https:\/\/www.sqrlab.ca\/lectures\/csci1060u-f20\/CSCI1060U_Lecture_02.pdf\">[PDF]<\/a><\/li>\n<li><em>Video:<\/em> <a href=\"https:\/\/drive.google.com\/file\/d\/1j6HOHP9B1O3a-DVAXVSpy-OIhkhDQdA_\/view\">[Google Drive]<\/a><\/li>\n<li><em>Exercises:<\/em>\n<ul>\n<li><a href=\"http:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/hello_string.cpp\">hello_string.cpp<\/a>\u00a0\u2013 example of C++ input and output using a string.<\/li>\n<li><a href=\"http:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/hello_double.cpp\">hello_double.cpp<\/a>\u00a0\u2013 example of formatting double output.\u00a0<a href=\"https:\/\/youtu.be\/CCH2KfiZiz0\">[YouTube]<\/a><\/li>\n<li><a href=\"http:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/type_casting_ex1.cpp\">type_casting_ex1.cpp<\/a> \u2013 an extension of the hello_double example to show type casting.<\/li>\n<li><a href=\"http:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/char_to_int.cpp\">char_to_int.cpp<\/a> \u2013 a program that converts an ASCII character into an integer.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3><a id=\"L3\" name=\"L3\"><\/a>LECTURE 3: BRANCHING<\/h3>\n<ul>\n<li>Today we will learn about branching in C++ including if statements and switch statements.<\/li>\n<li><em>Slides:<\/em> <a href=\"https:\/\/www.sqrlab.ca\/lectures\/csci1060u-f20\/CSCI1060U_Lecture_03.pdf\">[PDF]<\/a><\/li>\n<li><em>Video:<\/em> <a href=\"https:\/\/drive.google.com\/file\/d\/1azH_1Ky-Px4D6-cZceFyz3NXVez9VmwC\/view?usp=sharing\">[Google Drive]<\/a><\/li>\n<li><em>Exercises:<\/em>\n<ul>\n<li><a href=\"http:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/int_swap.cpp\">int_swap.cpp<\/a> &#8211; in-class challenge problem to swap two integers without using a third temporary variable.<\/li>\n<li><a href=\"http:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/branching_ex1.cpp\">branching_ex1.cpp<\/a>\u00a0\u2013 if statement example with optional else if\u00a0 and else clauses.<\/li>\n<li><a href=\"http:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/branching_ex2.cpp\">branching_ex2.cpp<\/a>\u00a0\u2013 switch statement example.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3><a id=\"L4\" name=\"L4\"><\/a>LECTURE 4: LOOPING<\/h3>\n<ul>\n<li>Today we will learn about looping in C++ including for loops, while loops and do-while loops.<\/li>\n<li><em>Slides:<\/em> <a href=\"https:\/\/www.sqrlab.ca\/lectures\/csci1060u-f20\/CSCI1060U_Lecture_04.pdf\">[PDF]<\/a><\/li>\n<li><em>Video:<\/em> <a href=\"https:\/\/drive.google.com\/file\/d\/1RQamcPelBqAgWGY-WYXrg9j5ri-p0EBX\/view\">[Google Drive]<\/a><\/li>\n<li><em>Exercises:<\/em>\n<ul>\n<li><a href=\"http:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/loop_ex1.cpp\">loop_ex1.cpp<\/a> \u2013 three different for loop examples for adding up even numbers.<\/li>\n<li><a href=\"http:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/loop_ex2.cpp\">loop_ex2.cpp<\/a> \u2013 a while loop example for adding up even numbers.<\/li>\n<li><a href=\"http:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/loop_ex3.cpp\">loop_ex3.cpp<\/a> \u2013 a while loop example for finding the largest positive number less than 200,000 and divisible by 63.<\/li>\n<li><a href=\"http:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/loop_ex4.cpp\">loop_ex4.cpp<\/a> \u2013 a do-while loop example for summing positive numbers until a zero or negative number is entered by the user.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3><a id=\"L5\" name=\"L5\"><\/a>LECTURE 5: FUNCTIONS I<\/h3>\n<ul>\n<li>We will learn how to use predefined functions in libraries such as cmath and ctime. In addition to using predefined functions we can also create our own functions and use them in our programs. We will also start to learn about overloading functions.<\/li>\n<li><em>Slides:<\/em> <a href=\"https:\/\/www.sqrlab.ca\/lectures\/csci1060u-f20\/CSCI1060U_Lecture_05.pdf\">[PDF]<\/a><\/li>\n<li><em>Video:<\/em> <a href=\"https:\/\/drive.google.com\/file\/d\/1dx8B9IBCu6hAszbUu5Wmx3kA9PHPpG-j\/view?usp=sharing\">[Google Drive]<\/a><\/li>\n<li><em>Exercises:<\/em>\n<ul>\n<li><a href=\"http:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/predefined_function_ex1.cpp\">predefined_function_ex1.cpp<\/a>\u00a0\u2013 using predefined functions from cmath in your programs. <a href=\"https:\/\/youtu.be\/bF_JAyqsgPM\">[YouTube]<\/a><\/li>\n<li><a href=\"http:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/predefined_function_ex2.cpp\">predefined_function_ex2.cpp\u00a0<\/a> \u2013 using predefined functions to create random student numbers. <a href=\"https:\/\/youtu.be\/bF_JAyqsgPM\">[YouTube]<\/a><\/li>\n<li><a href=\"http:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/programmer_function_ex1.cpp\">programmer_function_ex1.cpp<\/a> \u2013 creating a programmer defined function. <a href=\"https:\/\/youtu.be\/PO9EJ3MpCKY\">[YouTube]<\/a><\/li>\n<li><a href=\"http:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/programmer_function_ex1b.cpp\">programmer_function_ex1b.cpp<\/a>\u00a0\u2013\u00a0 overloading functions.\u00a0<a href=\"https:\/\/youtu.be\/PO9EJ3MpCKY\">[YouTube]<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3><a name=\"L6\"><\/a>LECTURE 6: FUNCTIONS II<\/h3>\n<ul>\n<li>Today, we will continue to learn about programmer-defined functions topics including the difference between call-by-value and call-by-reference parameters.<\/li>\n<li><em>Slides:<\/em> none<\/li>\n<li><em>Video:<\/em> <a href=\"https:\/\/drive.google.com\/file\/d\/18ututF-jMGUdWGUi_c7GzI0zGyGiiAHa\/view?usp=sharing\">[Google Drive]<\/a><\/li>\n<li><em>Exercises:<\/em>\n<ul>\n<li><a href=\"http:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/programmer_function_ex1c.cpp\">programmer_function_ex1c.cpp<\/a> \u2013\u00a0 overloading functions.<\/li>\n<li><a href=\"http:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/programmer_function_ex2.cpp\">programmer_function_ex2.cpp<\/a>,\u00a0<a href=\"http:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/programmer_function_ex2b.cpp\">programmer_function_ex2b.cpp<\/a>\u00a0\u2013 call-by-value vs. call-by-reference parameters vs. const call-by-reference parameters\u00a0<a href=\"https:\/\/youtu.be\/li4IS1Lx1lw\">[YouTube]<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3><a id=\"L7\" name=\"L7\"><\/a>LECTURE 7: FILE INPUT\/OUTPUT I<\/h3>\n<ul>\n<li>Today we\u2019ll learn about file input and output using streams. How to write to files, read from a file and append to a file. Our file input and output example will also introduce arrays. Although arrays are not the main topic of the lecture they are an important programming language concept. Next, we\u2019ll learn how to handle when a file fails to open. To assist with the example we will learn about the the chmod Linux command.<\/li>\n<li><em>Video:<\/em> <a href=\"https:\/\/drive.google.com\/file\/d\/1d6zl3AZgw6BfaXT15kYVgQllh9S0qGvb\/view?usp=sharing\">[Google Drive]<\/a><\/li>\n<li><em>Exercises:<\/em>\n<ul>\n<li><a href=\"http:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/fileio_ex1.cpp\">fileio_ex1.cpp<\/a> \u2013 writing to a file and reading from a file. <a href=\"https:\/\/youtu.be\/P6H7qOtnPcs\">[YouTube]<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3><a id=\"T1\" name=\"T2\"><\/a>Test 1: Lectures 1-7<\/h3>\n<ul>\n<li><em>Test Review Video:<\/em> <a href=\"https:\/\/drive.google.com\/file\/d\/16eh1Wi4ROLbCZiVpEOM_ouQklyvIhEmz\/view?usp=sharing\">[Google Drive]<\/a><\/li>\n<\/ul>\n<h3><a id=\"L8\" name=\"L8\"><\/a>LECTURE 8: FILE INPUT\/OUTPUT II<\/h3>\n<ul>\n<li>Today we\u2019ll learn more about file input and output using streams including how to append to a file. Next, we\u2019ll learn how to handle when a file fails to open. To assist with the example we will learn about the the chmod Linux command.<\/li>\n<li><em>Notes:<\/em> <a href=\"http:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/chmod.txt\">[chmod.txt]<\/a><\/li>\n<li><em>Video:<\/em> <a href=\"https:\/\/drive.google.com\/file\/d\/12TZbLN3Buhxy0LwnUuR38CgRS2N6BaJT\/view?usp=sharing\">[Google Drive]<\/a><\/li>\n<li><em>Exercises:<\/em>\n<ul>\n<li><a href=\"http:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/fileio_ex2.cpp\">fileio_ex2.cpp<\/a>\u00a0\u2013 appending to a file.\u00a0<a href=\"https:\/\/youtu.be\/XBL0GZkYzcQ\">[YouTube]<\/a><\/li>\n<li><a href=\"http:\/\/www.sqrlab.ca\/exercises\/csci1060u-f18\/fileio_ex3.cpp\">fileio_ex3.cpp<\/a>\u00a0\u2013 example of handling file access issues\/errors during reading and writing.<\/li>\n<\/ul>\n<\/li>\n<li><em>References:<\/em>\n<ul>\n<li><a href=\"http:\/\/www.thegeekstuff.com\/2010\/06\/chmod-command-examples\/\">7 Chmod Command Examples for Beginners<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3><a id=\"L9\" name=\"L9\"><\/a>LECTURE 9: CODE STYLE &amp; DOCUMENTATION<\/h3>\n<ul>\n<li>Overview of how to properly document your programs including in-program documentation and API documentation. We will also learn about code style \u2013 best practices for how to write and organize your programs. Examples of code style include best practices for indentation, white space, line length, comments, naming conventions and file structure.<\/li>\n<li><em>Slides:<\/em>\u00a0<a href=\"https:\/\/www.sqrlab.ca\/lectures\/csci1060u-f20\/CSCI1060U_Lecture_09.pdf\">[PDF]<\/a><\/li>\n<li><em>Video:<\/em> <a href=\"https:\/\/drive.google.com\/file\/d\/1UYkDdYDo1R4ewi4937xZ9bRIqbpbMmCO\/view\">[Google Drive]<\/a><\/li>\n<li><em>References:<\/em>\n<ul>\n<li><a href=\"https:\/\/google.github.io\/styleguide\/cppguide.html\">Google C++ Style Guide<\/a><\/li>\n<li><a href=\"https:\/\/firefox-source-docs.mozilla.org\/code-quality\/coding-style\/index.html\">Mozilla Developer Network Coding Style<\/a><\/li>\n<li><a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/win32\/stg\/coding-style-conventions\">Microsoft Windows Developer Coding Style Conventions<\/a><\/li>\n<li><a href=\"https:\/\/www.oracle.com\/java\/technologies\/javase\/codeconventions-contents.html\">Java Code Conventions<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3><a id=\"L10\" name=\"L10\"><\/a>LECTURE 10: NAMESPACES<\/h3>\n<ul>\n<li>Overview of the four kinds of namespaces in C++: the standard namespace, user-defined namespaces, the unnamed namespace and the global namespace.<\/li>\n<li><em>Video:<\/em> <a href=\"https:\/\/drive.google.com\/file\/d\/1dUB-Nf1OJSPH_jO2d7PjCys1bWMjx7U5\/view?usp=sharing\">[Google Drive]<\/a><\/li>\n<li><em>Slides:<\/em>\u00a0<a href=\"https:\/\/www.sqrlab.ca\/lectures\/csci1060u-f20\/CSCI1060U_Lecture_10.pdf\">[PDF]<\/a><\/li>\n<li><i>Exercises:<\/i>\n<ul>\n<li><a href=\"http:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/namespace_ex1.cpp\">namespace_ex1.cpp<\/a>\u00a0\u2013 examples of using the standard namespace, user-defined namespaces and unnamed namespace as well as an examples of using the scope resolution operator (::) with namespaces.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3><a id=\"L11\" name=\"L11\"><\/a>LECTURE 11: PROBLEM SOLVING IN C++ I (CONNECT 4)<\/h3>\n<ul>\n<li>Today we\u2019ll\u00a0build on the C++ concepts that we\u2019ve covered in Lectures 1-10 and put them all together to program Connect 4.<\/li>\n<li><em>Video:<\/em> <a href=\"https:\/\/drive.google.com\/file\/d\/1BvwHlidGyvyDq-TYYKY53dTZd17VpdNY\/view?usp=sharing\">[Google Drive]<\/a><\/li>\n<li><em>Exercises:<\/em>\n<ul>\n<li><a href=\"http:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/connect4_v1.cpp\">connect4_v1.cpp<\/a>\u00a0\u2013 the first version of our Connect 4 game.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3><a id=\"L12\" name=\"L12\"><\/a>LECTURE 12: PROBLEM SOLVING IN C++ II (CONNECT 4)<\/h3>\n<ul>\n<li>Today we\u2019ll\u00a0continue to build on the C++ concepts that we\u2019ve covered in Lectures 1-10 and put them all together to program Connect 4.<\/li>\n<li><em>Video:<\/em> <a href=\"https:\/\/drive.google.com\/file\/d\/1wNR7W-APeGLTHoxTbnLBXGaq5jw7kkRM\/view?usp=sharing\">[Google Drive]<\/a><\/li>\n<li><em>Exercises:<\/em>\n<ul>\n<li><a href=\"https:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/connect4_v2.cpp\">connect4_v2.cpp<\/a>\u00a0\u2013 the second version of our Connect 4 game.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3><a id=\"L13\" name=\"L13\"><\/a>LECTURE 13: POINTERS IN C++ I<\/h3>\n<ul>\n<li>Introduction to pointers, declaring a pointer variable, the dereferencing operator and the address-of operator.<\/li>\n<li><em>Video:<\/em> <a href=\"https:\/\/drive.google.com\/file\/d\/1Tk3buk1PUDJvw1i_wel7G6Kn5CaBCw1u\/view?usp=sharing\">[Google Drive]<\/a><\/li>\n<li><em>Slides:<\/em>\u00a0<a href=\"https:\/\/www.sqrlab.ca\/lectures\/csci1060u-f20\/CSCI1060U_Lecture_13.pdf\">[PDF]<\/a><\/li>\n<\/ul>\n<h3><a id=\"L14\" name=\"L14\"><\/a>LECTURE 14: POINTERS IN C++ II<\/h3>\n<ul>\n<li>More pointers and defining pointer types.<\/li>\n<li><em>Video:<\/em> <a href=\"https:\/\/drive.google.com\/file\/d\/1Y7B13vK0-vmIYFpUMLXwrhn2B6Dpa7Rz\/view?usp=sharing\">[Google Drive]<\/a><\/li>\n<li><em>Slides:<\/em>\u00a0<a href=\"https:\/\/www.sqrlab.ca\/lectures\/csci1060u-f20\/CSCI1060U_Lecture_14.pdf\">[PDF]<\/a><\/li>\n<li>Exercises:\n<ul>\n<li><a href=\"https:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/pointers_ex1.cpp\">pointers_ex1.cpp<\/a>\u00a0\u2013 an\u00a0example of using pointers with ordinary (automatic) variables in C++.\u00a0\u00a0<a href=\"https:\/\/youtu.be\/wae1-A1FVDc\">[YouTube]<\/a><\/li>\n<li><a href=\"https:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/pointers_ex2.cpp\">pointers_ex2.cpp<\/a>, <a href=\"https:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/pointers_ex3.cpp\">pointers_ex3.cpp<\/a> \u2013 an example of how to pass a pointer variable to a function as a call-by-value parameter. This is the first of two examples that highlight the difference between passing a pointer as a call-by-value vs. call-by-reference parameter.\u00a0 <a href=\"https:\/\/youtu.be\/W0dQNtX-4uc\">[YouTube<\/a>\u00a0&amp;\u00a0<a href=\"https:\/\/youtu.be\/OONCkaKbOeE\">YouTube<\/a>]<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3><a id=\"T2\" name=\"T2\"><\/a>Test 2: Lectures 1-14 (emphasis on 8-14)<\/h3>\n<ul>\n<li><em>Test Review Video:<\/em> <a href=\"https:\/\/drive.google.com\/file\/d\/1v0YfJnDIaXSgJVvBbxCZIVmLNtbQbz0-\/view?usp=sharing\">[Google Drive]<\/a><\/li>\n<\/ul>\n<h3><a id=\"L15\" name=\"L15\"><\/a>LECTURE 15: DYNAMIC VARIABLES<\/h3>\n<ul>\n<li>Using pointers to create dynamic variables and dynamic arrays.<\/li>\n<li><em>Video:<\/em> <a href=\"https:\/\/drive.google.com\/file\/d\/1qBNHuxTgBF8RKM69J3BCEvhIVHNsc30B\/view?usp=sharing\">[Google Drive]<\/a><\/li>\n<li><em>Slides:<\/em>\u00a0<a href=\"https:\/\/www.sqrlab.ca\/lectures\/csci1060u-f20\/CSCI1060U_Lecture_15.pdf\">[PDF]<\/a><\/li>\n<li><em>Jamboard:<\/em>\n<ul>\n<li>Dynamic variable example:<br \/><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-544\" src=\"https:\/\/www.sqrlab.ca\/csci1060u\/wp-content\/uploads\/sites\/31\/2020\/11\/CSCI1060U_lecture15_1.jpg\" alt=\"A visualization of memory for an ordinary variable vs a dynamic variable\" width=\"1714\" height=\"651\" srcset=\"https:\/\/www.sqrlab.ca\/csci1060u\/wp-content\/uploads\/sites\/31\/2020\/11\/CSCI1060U_lecture15_1.jpg 1714w, https:\/\/www.sqrlab.ca\/csci1060u\/wp-content\/uploads\/sites\/31\/2020\/11\/CSCI1060U_lecture15_1-300x114.jpg 300w, https:\/\/www.sqrlab.ca\/csci1060u\/wp-content\/uploads\/sites\/31\/2020\/11\/CSCI1060U_lecture15_1-1024x389.jpg 1024w, https:\/\/www.sqrlab.ca\/csci1060u\/wp-content\/uploads\/sites\/31\/2020\/11\/CSCI1060U_lecture15_1-768x292.jpg 768w, https:\/\/www.sqrlab.ca\/csci1060u\/wp-content\/uploads\/sites\/31\/2020\/11\/CSCI1060U_lecture15_1-1536x583.jpg 1536w, https:\/\/www.sqrlab.ca\/csci1060u\/wp-content\/uploads\/sites\/31\/2020\/11\/CSCI1060U_lecture15_1-500x190.jpg 500w\" sizes=\"auto, (max-width: 1714px) 100vw, 1714px\" \/><\/li>\n<\/ul>\n<\/li>\n<li><em>Exercises:<\/em>\n<ul>\n<li><a href=\"http:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/dynamic_variable.cpp\">dynamic_variable.cpp<\/a>\u00a0\u2013 creating and deleting a dynamic variable<\/li>\n<li><a href=\"http:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/dynamic_array.cpp\">dynamic_array.cpp<\/a>\u00a0\u2013 creating and deleting a dynamic array<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3><a id=\"L16\" name=\"L16\"><\/a>LECTURE 16: DYNAMIC\u00a0ARRAYS<\/h3>\n<ul>\n<li>More examples of\u00a0dynamic\u00a0arrays.<\/li>\n<li><em>Video:<\/em> <a href=\"https:\/\/drive.google.com\/file\/d\/1xDSrQvpIDWgXMI6tsUsj9ptrHfMqgerY\/view?usp=sharing\">[Google Drive]<\/a><\/li>\n<li><em>Slides:<\/em>\u00a0<a href=\"https:\/\/www.sqrlab.ca\/lectures\/csci1060u-f20\/CSCI1060U_Lecture_16.pdf\">[PDF]<\/a><\/li>\n<li><em>Exercises:<\/em>\n<ul>\n<li><a href=\"http:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/dynamic_array_ex2.cpp\">dynamic_array_ex2.cpp<\/a>\u00a0\u2013\u00a0using a dynamic array to input an unknown number of integers from a user<\/li>\n<li><a href=\"http:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/dynamic_array_ex3.cpp\">dynamic_array_ex3.cpp<\/a>\u00a0\u2013 using an integer pointer to return a dynamic array from a function<\/li>\n<li><a href=\"http:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/2d_dynamic_array.cpp\">2d_dynamic_array.cpp<\/a> &#8211; an example of creating and destroying a 2D dynamic array of integers.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3><a id=\"L17\" name=\"L17\"><\/a>LECTURE 17: CLASSES IN C++ I<\/h3>\n<ul>\n<li>An introduction to structures and classes in C++. We will learn about member variables, member functions including constructors, destructors, accessor and mutator functions.<\/li>\n<li><em>Video:<\/em> <a href=\"https:\/\/drive.google.com\/file\/d\/1HjEuesMpqZsmLtcqA1Ksnd3mktZgxnzX\/view?usp=sharing\">[Google Drive]<\/a><\/li>\n<li><em>Slides:\u00a0<\/em><a href=\"https:\/\/www.sqrlab.ca\/lectures\/csci1060u-f20\/CSCI1060U_Lecture_17.pdf\">[PDF]<\/a><\/li>\n<li><em>Exercises:<\/em>\n<ul>\n<li><a href=\"http:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/struct_ex.cpp\">struct_ex.cpp<\/a>\u00a0\u2013 an example of a Person composite data type\u00a0<a href=\"https:\/\/youtu.be\/GZU8JBS1ugo\">[YouTube]<\/a><\/li>\n<li><a href=\"http:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/class_ex1.cpp\">class_ex1.cpp<\/a>\u00a0\u2013 an example of a Person class\u00a0<a href=\"https:\/\/youtu.be\/pJ65HIjnTsE\">[YouTube]<\/a>\u00a0<a href=\"https:\/\/youtu.be\/Ma-PS0H5hxk\">[YouTube]<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3><a id=\"L18\" name=\"L18\"><\/a>LECTURE 18: CLASSES IN C++ II<\/h3>\n<ul>\n<li>More on classes in C++ including friend functions and overloading operators.<\/li>\n<li><em>Video:<\/em> <a href=\"https:\/\/drive.google.com\/file\/d\/1ILb5yh8EaN4tx_8WZ2ElaCdgyPN6TY_I\/view?usp=sharing\">[Google Drive]<\/a><\/li>\n<li><em>Slides:\u00a0<\/em><a href=\"https:\/\/www.sqrlab.ca\/lectures\/csci1060u-f20\/CSCI1060U_Lecture_18.pdf\">[PDF]<\/a><\/li>\n<li><em>Exercises:<\/em>\n<ul>\n<li><a href=\"http:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/class_ex2.cpp\">class_ex2.cpp<\/a> \u2013 friend functions in a Person class<\/li>\n<li><a href=\"http:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/class_ex3.cpp\">class_ex3.cpp<\/a> \u2013 overloading operators (==, &lt;&lt;) in a Person class <a href=\"https:\/\/youtu.be\/vsnZEPY21o4\">[YouTube]<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3><a id=\"L19\" name=\"L19\"><\/a>LECTURE 19: Implementing A STACK in C++<\/h3>\n<ul>\n<li>Implementing a Stack class in C++ using pointers.<\/li>\n<li><em>Video:<\/em> <a href=\"https:\/\/drive.google.com\/file\/d\/1e0uQ8LvdDChuTHoUz7Cbg_-aD5HMbHqu\/view?usp=sharing\">[Google Drive]<\/a><\/li>\n<li><em>Jamboard:<\/em>\n<ul>\n<li>Data structures:<br \/><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-566 size-large\" src=\"https:\/\/www.sqrlab.ca\/csci1060u\/wp-content\/uploads\/sites\/31\/2020\/11\/data_structures-1024x370.jpg\" alt=\"Data structures\" width=\"584\" height=\"211\" srcset=\"https:\/\/www.sqrlab.ca\/csci1060u\/wp-content\/uploads\/sites\/31\/2020\/11\/data_structures-1024x370.jpg 1024w, https:\/\/www.sqrlab.ca\/csci1060u\/wp-content\/uploads\/sites\/31\/2020\/11\/data_structures-300x109.jpg 300w, https:\/\/www.sqrlab.ca\/csci1060u\/wp-content\/uploads\/sites\/31\/2020\/11\/data_structures-768x278.jpg 768w, https:\/\/www.sqrlab.ca\/csci1060u\/wp-content\/uploads\/sites\/31\/2020\/11\/data_structures-1536x556.jpg 1536w, https:\/\/www.sqrlab.ca\/csci1060u\/wp-content\/uploads\/sites\/31\/2020\/11\/data_structures-500x181.jpg 500w, https:\/\/www.sqrlab.ca\/csci1060u\/wp-content\/uploads\/sites\/31\/2020\/11\/data_structures.jpg 1833w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><\/li>\n<\/ul>\n<\/li>\n<li><em>Exercises:<\/em>\n<ul>\n<li><a href=\"http:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/stack.cpp\">stack.cpp<\/a> \u2013 a Stack class with a constructor, deconstructor, pop function, push function, isEmpty function and toString function<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3><a id=\"L20\" name=\"L20\"><\/a>LECTURE 20: Implementing A Linked List in C++<\/h3>\n<ul>\n<li>Implementing a Linked List class in C++ using pointers.<\/li>\n<li><em>Video:<\/em> <a href=\"https:\/\/drive.google.com\/file\/d\/1pP2M9ys5IIxY8xeXMB9Et3UdzIdrHtVf\/view?usp=sharing\">[Google Drive]<\/a><\/li>\n<li><em>Jamboard:<\/em>\n<ul>\n<li>Linked list overview:<br \/><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-575\" src=\"https:\/\/www.sqrlab.ca\/csci1060u\/wp-content\/uploads\/sites\/31\/2020\/12\/linked_list.jpg\" alt=\"Linked List overview\" width=\"1289\" height=\"945\" srcset=\"https:\/\/www.sqrlab.ca\/csci1060u\/wp-content\/uploads\/sites\/31\/2020\/12\/linked_list.jpg 1289w, https:\/\/www.sqrlab.ca\/csci1060u\/wp-content\/uploads\/sites\/31\/2020\/12\/linked_list-300x220.jpg 300w, https:\/\/www.sqrlab.ca\/csci1060u\/wp-content\/uploads\/sites\/31\/2020\/12\/linked_list-1024x751.jpg 1024w, https:\/\/www.sqrlab.ca\/csci1060u\/wp-content\/uploads\/sites\/31\/2020\/12\/linked_list-768x563.jpg 768w, https:\/\/www.sqrlab.ca\/csci1060u\/wp-content\/uploads\/sites\/31\/2020\/12\/linked_list-409x300.jpg 409w\" sizes=\"auto, (max-width: 1289px) 100vw, 1289px\" \/><\/li>\n<\/ul>\n<\/li>\n<li><em>Exercises:<\/em>\n<ul>\n<li><a href=\"http:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/linked_list.cpp\">linked_list.cpp<\/a> \u2013 a Linked List class with a constructor, deconstructor, addFront function, addBack function and isEmpty function.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3><a id=\"L21\" name=\"L21\"><\/a>LECTURE 21: Implementing A Linked List in C++ II<\/h3>\n<ul>\n<li>Continuing to implement a Linked List class in C++ using pointers.<\/li>\n<li><em>Video:<\/em> <a href=\"https:\/\/drive.google.com\/file\/d\/12YNPZFL6d26F8PAwVyIcdy_DW4VQOUe-\/view?usp=sharing\">[Google Drive]<\/a><\/li>\n<li><em>Exercises:<\/em>\n<ul>\n<li><a href=\"http:\/\/www.sqrlab.ca\/exercises\/csci1060u-f20\/linked_list_ex2.cpp\">linked_list_ex2.cpp<\/a> \u2013 a Linked List class with a constructor, deconstructor, addFront function, addBack function, isEmpty function as well as a remove function, a displayList function and an operator= overloaded function.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3><a id=\"T3\" name=\"T3\"><\/a>Test 3: Lectures 1-21 (emphasis on 15-21)<\/h3>\n<ul>\n<li><em>Test Review Video:<\/em> <a href=\"https:\/\/drive.google.com\/file\/d\/1JTzmERsjW4qK3wwY8sy5bFX4ZNYlwYzt\/view?usp=sharing\">[Google Drive]<\/a><\/li>\n<\/ul>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Lecture 1:\u00a0Introduction to C++ Lecture 2: Data Types Variables &amp; Type Casting Lecture 3: Branching Lecture 4: Looping Lecture 5: Functions I Lecture 6: Functions II Lecture 7: File I\/O I Test 1: Lectures 1-7 Lecture 8: File I\/O II &hellip; <a href=\"https:\/\/www.sqrlab.ca\/csci1060u\/lectures\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":441,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"sidebar-page.php","meta":{"jetpack_post_was_ever_published":false,"footnotes":""},"class_list":["post-13","page","type-page","status-publish","has-post-thumbnail","hentry"],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/PcmAMt-d","_links":{"self":[{"href":"https:\/\/www.sqrlab.ca\/csci1060u\/wp-json\/wp\/v2\/pages\/13","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sqrlab.ca\/csci1060u\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.sqrlab.ca\/csci1060u\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.sqrlab.ca\/csci1060u\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sqrlab.ca\/csci1060u\/wp-json\/wp\/v2\/comments?post=13"}],"version-history":[{"count":223,"href":"https:\/\/www.sqrlab.ca\/csci1060u\/wp-json\/wp\/v2\/pages\/13\/revisions"}],"predecessor-version":[{"id":580,"href":"https:\/\/www.sqrlab.ca\/csci1060u\/wp-json\/wp\/v2\/pages\/13\/revisions\/580"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sqrlab.ca\/csci1060u\/wp-json\/wp\/v2\/media\/441"}],"wp:attachment":[{"href":"https:\/\/www.sqrlab.ca\/csci1060u\/wp-json\/wp\/v2\/media?parent=13"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}