Skip to content

Instantly share code, notes, and snippets.

@djavanm
Forked from rwarbelow/mod_0_session_4_readings.md
Last active April 17, 2019 22:30
Show Gist options
  • Select an option

  • Save djavanm/93d47412cb09485cbf8b55617a3f06ec to your computer and use it in GitHub Desktop.

Select an option

Save djavanm/93d47412cb09485cbf8b55617a3f06ec to your computer and use it in GitHub Desktop.
Mod 0 Session 4 Readings and Responses

Session 4 Readings and Responses

The readings and responses listed here should take you approximately 50 minutes total.

To start this assignment:

  1. Click the button in the upper right-hand corner that says Fork. This is now your copy of this document.
  2. Click the Edit button when you're ready to start adding your answers.
  3. To save your work, click the green button in the bottom right-hand corner. You can always come back and re-edit your gist.

Assignment 1 (30 min)

Read Turing Instructor David Whitaker's article on Git and GitHub

  • Use the article and outside resources (Google!) to describe the general process of a collaborative git workflow in the space below.

Git allows multiple users to download the newest version of a repository, then add changes to them locally. Creating a fork and then clone of a repository allows you to work in the newest version of a set of files. You can then edit those files locally, and then commit them. From there, you can push the recently editted version of the repository back to Github where they check all changes made to the repository. Doing this allows one use to work in the same project from multiple computers, or with multiple people.

Assignment 2 (10 min)

  • Watch Tim's video on classes and objects.

  • In the space below, come up with your own example of a class (like "bottle") and several objects (like "spray bottle", "nalgene", etc.): Class Car: Year: Model: Make: Seats:

Object Car: Civic Year: 2017 Model: SE Make: Honda Seats: 5

Object Car: Jetta Year: 2016 Model: S Make: Vokswagen Seats: 5

Object Car: Lancer Year: 2013 Model: SE Make: Mitsubishi Seats: 5

Assignment 3 (20 min)

In preparation for our final technical session on Tuesday, read FreeCodeCamp's Object Oriented Programming Concepts. This article touches on four big concepts: encapsulation, abstraction, inheritance, and polymorphism. Although the final two are beyond the scope of Mod 0, it's good to be exposed to unfamiliar terms so that when you hear them the second time around, they make more sense. After reading the article, describe in three sentences or less each of the concepts in your own words. Feel free to use Google to supplement your understanding.

  • Encapsulation: This is the idea of only allowing certain parts of an objects state to be visible by outside sources. An object may contain has a state that it keeps private, while also allowing one to alter the state by calling a set of public methods or functions.

  • Abstraction: Abstraction is when an object makes sure to keep the details of its processes private, and only exposes high level information to anything that interacts. An example of this would be an television. You cannot see the parts operating inside, and when manipulated by using the power button, you are given one specific output that you are meant to interact with.

  • Inheritance: This is the idea of taking one class, and applying different methods to create a completely new class. You would take a parent class, and apply methods to it to create the child class which may add new information, or remove information that was derived from the original class.

  • Polymorphism: This means you will take a class- and then alter it in a way so that it is not the same as the original, but you can categorize it as if it were the same type of class as the original.

Assignment 4 (40 min)

Skim this intro to Markdown. It's not necessary to memorize because you can always come back to it as a reference.

Next, a new gist of your own by clicking the New Gist button in the upper right-hand corner of the screen. Create a "Beginners Guide to Git" documenting your git knowledge so far using Markdown. Incorporate each of the following features into your Gist:

@katiescruggs
Copy link

Great work, @djavanm! Nice example of the car class with objects. I like how you described which attributes all of these objects have in common since they are from the same class!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment