Skip to content

Commit 162ac8e

Browse files
committed
Fixes #146, minor typos in Object tutorial
1 parent 624359f commit 162ac8e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

content/static/tutorials/objects/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ <h3>Using an Object: The Details</h3>
204204
int var; // type name
205205
</pre>
206206
<br />
207-
Primitive data types are singular pieces of information: an integer, a float, a character, etc. Declaring a variable that holds onto an object is quite similar. The diff erence is that here the type is the class name, something we will make up, in this case "Car." Objects, incidentally, are not primitives and are considered complex data types. (This is because they store multiple pieces of information: data and functionality. Primitives only store data.)
207+
Primitive data types are singular pieces of information: an integer, a float, a character, etc. Declaring a variable that holds onto an object is quite similar. The difference is that here the type is the class name, something we will make up, in this case "Car." Objects, incidentally, are not primitives and are considered complex data types. (This is because they store multiple pieces of information: data and functionality. Primitives only store data.)
208208
<br /><br />
209209
<strong>Step 2. Initializing an object.</strong>
210210
<br /><br />
@@ -343,7 +343,7 @@ <h3>Objects are data types too!</h3>
343343
<br /><br />
344344
If you were programming the Space Invaders game, for example, you might create a <em>Spaceship</em> class, an <em>Enemy</em> class, and a <em>Bullet</em> class, using an object for each entity in your game.
345345
<br /><br />
346-
In addition, although not primitive, classes are data types just like integers and floats. And since classes are made up of data, an object can therefore contain other objects! For example, let's assume you had just finished programming a <em>Fork</em> and <em>Spoon</em> class. Moving on to a <em>PlaceSetting</em> class, you would likely include variables for both a <em>Fork</em> object and a <em>Spoon</em> object inside that class itself. Th is is perfectly reasonable and quite common in object-oriented programming.
346+
In addition, although not primitive, classes are data types just like integers and floats. And since classes are made up of data, an object can therefore contain other objects! For example, let's assume you had just finished programming a <em>Fork</em> and <em>Spoon</em> class. Moving on to a <em>PlaceSetting</em> class, you would likely include variables for both a <em>Fork</em> object and a <em>Spoon</em> object inside that class itself. This is perfectly reasonable and quite common in object-oriented programming.
347347
<pre>
348348
class PlaceSetting {
349349

0 commit comments

Comments
 (0)