Home Segments Index Top Previous Next

293: Practice

Design a class hierarchy for a dozen buildings. At the highest level, define getters for squareFeet and age and locationMultiplier. Write an instance method, appraise, for the classes in your hierarchy. Include classes such as Bungalow, Mansion, Skyscraper, and Warehouse.