+ 2
Would some one be able to give me a real world example of instantiation?
I want to know how an object relates when it is instantiated into a class. I need to rap my head around this idea.
2 Respostas
+ 7
Assume you want to code an application that analyses students records. You make a class say Students and define several properties for a typical student like age or averageScore etc. Then every time you make an object of the class Student equivalently you are actually instanciating the Student class.
0
So to clarify, could you consider an object to be an actual student, you create an instance of that student by passing though assigned properties through the class. Am I making any sense? Am I overthinking this?