I have a base class Building and subclasses House and School. I have declared an array of Building objects the following way. I am not sure how to assign subclasses to each array element (run time type).
Building[] House = new Building[3];
Building[] School = new School[2];
lowerCamelCasefor variables andCamelCasefor classes. Following these conventions will make the code easier to work with for all developers.Schoola variable name or a class name? You're using it both different ways in the same statement.