COMP3200 Anonymous Questions and Answers Keyword Index |
This page provides a keyword index to questions and answers. Clicking on a keyword will take you to a page containing all questions and answers for that keyword, grouped by year.
To submit a question, use the anonymous questions page. You may find the keyword index and/or top-level index useful for locating past questions and answers.
Keyword reference for object
2024 |
Submission reference: IN3648
Could i get a definition and another example of an object? i have started reading 1.1 and i still dont understand what exactly and object is
Don't worry too much at this stage if you are not immediately understanding the concepts. That is perfectly normal. Things will become clearer as you get experience with each topic.
There are lots of ways we could try to explain what classes and objects are. Some will work better than others for different people.
A common way to explain classes and objects is that a class is like a blueprint or a plan for something. It provides instructions for how to build something, but it is not - itself - the thing that is being built. Objects are the (possibly physical) things you use the plan to build. For instance, a set of instructions for a LEGO model would be the class and the LEGO model that is made out of bricks would be the object build from the class/plan. You could choose to individualise the models you build by choosing different colours for the bricks, but still stick to the overall plan for how the bricks are put together. That captures the sense that individual objects, while being broadly the same, can have variations from each other.
Hopefully, that will help.
Keywords: class , object , LEGO
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License. |