There are ordinary buildings, and there are school buildings. Make one inherit the other, and think about the type of object the getSchool and getBuilding methods should return. Change null to a Building or School object.
Building and School
- 4
Locked
Comments (4)
- Popular
- New
- Old
You must be signed in to leave a comment
Thayalan Ravi
12 February, 01:04
Just wanted to ask, what does this below syntax means? I; ve never encountered such code so far in my learning
Building school = getSchool();
Building shop = getBuilding();
Thank>
0
jerry
8 September 2021, 09:02
//write your code here whyyyyyyyyyy u put it everywhere where no need to code ..AAAA thbgkfdfsbnad
such a waste of time
0
Devonte A
6 July 2020, 08:35
Why was there a /*write your code here*/ prompt on building?
0
ImDevin
5 June 2021, 01:57
to confuse us 🤣
0