Lecture 5

Variables ….

1:00 a variable is basically a box where we stick stuff (I think in almost programming courses variables are often associated with their corresponding memory locations, meaning … a box)

1:24 how can a variable be described? via a name, type and value

2:07 the Java rule of writing variables: “they must start either with a letter or with an underscore”

3:27 the important thing to think about ūüôā in terms of the name is to give appropriate names to variables>>good software engineering principles

4:03 discussion continues about Java variables’ types

afterwards the course stresses on the integer and double variables’ use and,¬†in my¬†opinion is not so deep, but it is anyhow funny (especially if you want to know how many children Mehran has :)))¬†and worth listening it.

9:28 “before using variables, we need to declare them” – old C paradigm? who knows, we’ll find out…

11:30 maybe an important point to bear in mind, even if many will find it trivial: “where do you actually make these declarations?”

11:40 … and the answer: “inside methods

13:17¬† the meaning of equal operator, or assignement operator, which is completely different from the one in the mathematics, which translates in programming as “==”. Maybe a trivial thing, but this can trick¬†many beginer programmers. Actually some¬†minutes are completely dedicated to this item.

16:28 this is how to read a variable from the keyboard, it is more or less the Java correspondent of C’s scanf (and the function in Java is readInt)

18:36  meaning of + operator in Java often represents string concatenation.

19:41 “now we gonna have variables that contain objects, they just taste great” … and a memento of objects declared in the last classes, when¬†the discussions about Karel were at their heights, ¬†is done

20:20 don’t let the name GObject to foul you that this is an object, this is actually a class … I think this is a quite good small reference to the notorious problem of distinguishing between class and object

21:00 when you have objects you can create variables that stores objects inside them

22:00 it is basically about how objects are created in Java >> with new keyword

… funny the way professor Mehran explains how objects are created and initialized, how the class mechanism is working

26:08 let’s understand a little bit more about those messages or methods

honestly I think this is more a particular discussion about graphic objects and it is not so focused on the general concepts¬†about objects and classes; thinks ¬†like where is the origin of an object displayed on the graphic panel (its origin) or … how to set the color¬†of a graphic object or … how to set its font … how to draw an oval, a line or a¬†circle, personally I do not consider them so useful in the Java¬†learning process, so I won’t make any comment about them so far.

45:30 let me very quickly tell you a little bit about expressions before finishing up

what are they? “a bunch of terms, which can be individual variables or they can be constant values, or they can be some method calls, related via some operators, like the addition operator“, “when you take some terms and put operators between them to combine the terms, that’s called an expression


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: