Draw an object-oriented class diagram, including traditional unary, binary, and ternary relationships,
as well as generalization and aggregation relationships as needed, to represent the following business
environment. Include all of the attributes and operations listed in the description.
The Houston, TX, city government wants to develop an information system to keep track of
all the buildings in the city for both taxation and fire department dispatch purposes. The city will track
the address, year built, and owner of record of every building. It will also record the station number,
address, and telephone number of each fire station. Each fire station has primary responsibility for a
given set of buildings. There are four types of buildings: single-family homes, apartment buildings, stores, and office buildings. The city wants to record the number of apartments in each apartment building, and the
type of goods and annual sales volume of each store. It wants to record the number of floors in
each office building. It must also keep track of the companies in each office building. An office
building can have several or many companies in it; a company can have offices in several buildings.
Each company has a name, telephone number, and unique tax identification number. The city alsowants
to store the number of square feet that a particular company occupies in a particular office building.
Single-family homes are made up of three parts: the house itself, a garage, and a shed. The city wants to
keep track of the number of bedrooms, number of baths, and total floor space in the house, the capacity
of the garage in number of cars, and the capacity of the shed in volume (cubic feet). There is also a tax
calculation formula that differs for each of the four building types.
Here, buildings(Single family home,Apartments, Store, Office building) represent Generalisation.
Single family home consists of House, Garage and Shed, which represents Aggregation.
Comapny has a ternary relationship with buildings(each kind)
Tax Formula is unique for every type of building, hence depicted as a separate relationship.
Attributes for each class have been mentioned within the diagram.
Get Answers For Free
Most questions answered within 1 hours.