- #1
Robben
- 166
- 2
Homework Statement
How do I create an instance of a class in a method?
Homework Equations
None
The Attempt at a Solution
I am a bit rusty whenever I think of instances. I always think of main method and objects when I see instance which gets me confused on what to do with the following example:
I have a abstract class, School, and inside School I have some methods that must preform some action on an instance. For example, there is a move() method that must move the instance of School. Another method named, personOld(), which returns whether or not an instance of School surpassed some determined age.
How do I create this instance?
Last edited: