Solutions for those exercises.
Questions
- What is the keyword used to call the constructor from the base class?
-
this
. - the name of the base class.
-
base
-
over
-
inherits
Problem
Consider the following diagram:
Suppose you are given an implementation of the Room
class, such that
displays
-
Write an implementation of the
ClassRoom
class. YourToString
method should display the room’s building and number, in addition to whether it has AV set-up. -
Write a
SameBuilding
static method to be placed inside theRoom
class such thatWould display “true” and “false”.