This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
history | grep "cat" | wc -l | |
cat /usr/share/dict/words |grep "^a" |wc -l | |
cat /usr/share/dict/words |grep "^a"|grep "s$" | |
curl www.lighthouselabs.ca/index.html >savedHTML.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git help config | |
git config --global user.name "karlo" | |
git init | |
git status | |
git add "index.html" | |
git commit -m "Add index.html" | |
git add css/ | |
git log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Write a command that will output the number of times the cat command was used previously | |
-history | grep "cat" | wc -l | |
Write a command to output a count of all words in the unix dictionary file that begin with the letter "a" | |
-cat /usr/share/dict/words |grep "^a" |wc -l | |
What operating system (OS) vendor and version is your vagrant box running? | |
- | |
What UNIX command did you run to get the answer to the previous question? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Q1 | |
What is it mean when you say a language is object-oriented and why could it be considered an improvement over a procedural language? | |
-OOP is using objects to represent data and implement functions to encapsulate and modularize the code. | |
Q2 | |
What are structures and why are they useful? | |
-structures allow the code to be group accordingly | |
Q3 | |
What is the difference between an instance method and a class method and how do you differiate the two? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Q1: What is an instance variable? | |
- instance variable is a variable that is owned by an instantiated object. | |
Q2: The 4 Pillars of Object Oriented Programming are Abstraction, Encapsulation, Inheritance and Polymorphism. Describe each one. | |
Abstraction - to "hide" the logic and control what can be accessed or called by other objects | |
Encapsulation - to combine related objects, data and operations into a single unit | |
Inheritance - enable objects to receive/inherit the properties/attributes and methods without requiring it to re-declare or re-implement it | |
Polymorphism - allows the properties and methods of subclasses to have a different behavoir. | |
Q3: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tmpgist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Q1 Explain the different components of MVC - what are their responsibilities? | |
- Model - data source/holder | |
- View - all the UI elements | |
- Controller - displays the view and handles all the interaction between the model and view | |
Q2 What are some benefits of having an NSObject protocol separate from the NSObject class? | |
- When delegates conform to the NSObject protocol, the delegates will inherit the retain and release methods. Also, all the objects that will conform to the protocol are required to conform to NSObject protocol | |
- | |
Q3 Given the following person class, create a subclass LLShoutingPerson whose designated initializer is initWithLoudMessage:. Write the implementation for LLShoutingPerson's initializer. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Q1 We are writing an application that makes use of a custom view. This is the header file of our custom view class: | |
@interface LLView : UIView | |
@property (nonatomic, weak) UIViewController* parentViewController; | |
-(instancetype)initWithFrame:(CGRect)frame parent:(UIViewController*)parentVC; | |
-(void)configureViewWithObject:(LLObject*)object; | |
@end | |
Our view also detects taps. When it is tapped, it runs the following code: | |
LLViewController* nextViewController = [[LLViewController alloc] init]; | |
[self.parentViewController presentViewController:nextViewController]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
All test passed. | |
Issue with Test 06 instructions - There is no Giant salmon at depth 2, tile 1 |
OlderNewer