Raphs Deck Flashcards
What is lithium
A soft metal that is easily cut
What percentage of air is oxygen
20.9
Which flammable gas was used in the Hindenburg
Hydrogen
What does malodorous mean?
Smelly
What does affordance refer to
A cord affords pulling, a knob affords twisting - kind of like “allows for”
Difference between vagrant and homestead
Vagrant:
Creates virtual machines of dev environments
Homestead:
Predefined environment for laravel development
Comment this PHP code: // class Classname { } // $obj1 = new Classname();
// create a new class class Classname {
} // create a new object (instance) of the class $obj1 = new Classname();
PHP: What does this code do (use correct terminology) class Person {
}
$teacher = new Person(); $student - new Person();
(PHP) Creates two new objects (instances) of the Person class
(PHP) Explain each line of this code: class Fruit { public $count = 3; public $type; } $apple = new Fruit(); $apple->type = "apple";
Create a class called fruit
Give it a property called $count and set its value to 3
Give it another property called type but don’t set its type.
Create a new instance object of fruit and call it $apple
Set the $type property of $apple to the string “apple”
To echo out a property of an object, what is the syntax?
echo $object->property;
as in:
echo $teacher->isAlive;
What is the PHP syntax used for a
constructor method
The constructor method -has- to be called
__construct()
As in:
public function
__construct($prop1, $prop2) {
What is a PHP class?
a collection of variables and functions working with these variables. Variables are defined by var and functions by function. A class is defined using the following syntax:
What is an object?
An object is simply a copy or
instance of a “class”
Describe “Properties” and
“Methods” (PHP)
Properities are variables inside classes and methods are functions in classes (..or.. properties are variables belonging to something and methods are functions belonging to something)
(PHP)
In the example below, where are the values “me” and 35 passed to?
$teacher = new Person(“me”, 35);
The __construct function
What does the terminal touch command do? As in touch
raph.txt
Creates an empty file called raph.txt
In command line, what does ls –a do?
Like ls to list contents of current directory, but –a means
it shows hidden files