Week 1 Lecture and Section Notes
Week 1 Lecture and Section Notes PIC10C
Popular in Advanced Programming
verified elite notetaker
Popular in Department
This 5 page Class Notes was uploaded by bloodiris0312 on Saturday October 1, 2016. The Class Notes belongs to PIC10C at University of California - Los Angeles taught by Ricardo Salazar in Fall 2016. Since its upload, it has received 12 views.
Reviews for Week 1 Lecture and Section Notes
Report this Material
What is Karma?
Karma is the currency of StudySoup.
You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!
Date Created: 10/01/16
PIC10C Week 1 26.09 Lecture Get either Atlassian Bitbucket, Github Desktop or SourceTree Git does the actual version control. Front-end (GUI) applications are Bitbucket, Github, SourceTree, CLI (command line) Professor’s Bitbucket: rikis-salazar Procedure “Create” - in the cloud “Clone” - local git clone <address> Create file and git add <file> to staging area Commit files in staging area git commit <message> git commit -a Push files git push origin master[:master] Pull files git fetch origin git pull origin master [git diff] Branch creation git branch <name> git checkout On Bitbucket Source the files Commits commit timeline 27.09 Section TA: Brent Edmunds, soft-spoken email@example.com Generally to update on C++ 11th standard since textbook is inadequate size_t, auto, different for loops necessary Memory Stack frame: like a stack of Pringles, stacks upon each other with each function call. At the end of the function call, the stack frame associated with that function disappears. Stack and Heap memory Only way to get memory on heap is “new” keyword Resource Allocation Is Initialisation All dynamic memory must be wrapped in a class object. Subsequent rules for a class Constructor Copy constructor Destructor operator= 28.09 Lecture Miscellaneous topics Containers, range based loops & auto keyword, inheritance & polymorphism, runtime errors Containers Vectors random access cout Deque List sequential cout Instead of for(deque<int> iterator …………), use for(int element : v) 29.09 Section Office hours: 14~15 T/R Inheritance Purpose is to formalize “is a” relationship in code, ex. A teacher is a person. Virtual, abstract class, overriding, polymorphic container, proper deallocation Overriding Write a new function with the same name for a child class and the parent’s function is hidden from the child class...the child class will only call the child function. Overriding can occur with variables as well. Anything virtual is indicated in both base and derived classes. All destructors are virtual. 30.09 Lecture Some more commands available in Git Bash. Inheritance If the inheritance is changed to protected, all the behavior of the parent class is treated as protected in the child class. Multiple inheritance: there is only going to be 1 function, belonging to the parent class and not belonging to any specific object; without this each child function will create a copy of the parent function. Polymorphism There exists many functions with the same name across classes, the child functions overriding the parent function. allows compiler to determine which specific function to call. Makes function purely virtual and class becomes abstract; child classes have to implement the function and the parent class cannot construct objects.
Are you sure you want to buy this material for
You're already Subscribed!
Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'