scie204_wk6 class object handout_v3.docx, XXXXXXXXXX, David Bergman p1 of 1 the is the blueprint the is the thing you build and then use  an object is made from a class  you can make as many objects...

Its the Processing (language name)


scie204_wk6 class object handout_v3.docx, 2018.10.29, David Bergman p1 of 1 the is the blueprint the is the thing you build and then use  an object is made from a class  you can make as many objects from the class as you want +  these are the things (attributes + actions) you need to make the object work This makes them very clearly class names. If we do not use a prefix, the class could look like a variable, and that would cause confusion for you and me. ... up in the global variables... c_dog fido = new c_dog();//fido object is a dog c_dog frufru = new c_dog();//frufru is also a dog  the class, you can just use the variable or function name (there is no object name) eg. jumpHt = 14;//set the jump height to 14 feet  accessing a variable inside the class... no object name needed bark();//make a dog bark  accessing a function inside the class... no object name needed  the class , you need to use the dog's object name to access the variable or function has their own copy of all variables and functions, so you must use their names to access what's inside each one specifically: eg. fido.isDrooly = true;//set fido as drooly fido.jumpHt = 14;//set the jump height to 14 feet frufru.jumpHt = 14;//set the jump height to 14 feet frufru.init();// initialize frufru frufru.bark();//frufru barks fido.jump();//make fido jump frufru.jump();//make frufru jump fido.drawDog();//draw fido frufru.drawDog();//draw frufru Do not name your variables the same inside AND outside any class... it may lead to confusion / problems!
Oct 26, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here