1,234
edits
Changes
→Object Scope
|}
= INVESTIGATION 1: Classes and objects Objects =
In the last lab we created a '''class''' named Student and a couple of '''objects''' of type Student which were named student1 and student2. Let's spend some more time on that distinction.
Note that the function1() call does not modify the global '''authorName''' variable but function2() does.
== Object /Instance Scope == Every object can have variables that exist for that object only. You create and access those variables with the '''self.''' notation. Note that these are not '''class''' variables. Each object has its own set of '''instance''' variables. You will have seen that when you created objects in the Classes and Objects section above.
= LAB 7 SIGN-OFF (SHOW INSTRUCTOR) =