+ 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.

24th Oct 2017, 10:26 PM
Brian C. Novak
Brian C. Novak - avatar
2 Réponses
+ 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.
24th Oct 2017, 10:32 PM
Vahid Shirbisheh
Vahid Shirbisheh - avatar
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?
26th Oct 2017, 1:04 AM
Brian C. Novak
Brian C. Novak - avatar