CIS 254 – Data Structures                                                                             Klinger

 

Week 1 – Homework 1

 

Problem:

There is a city in California that has some unique zoning laws.  One of the laws includes restrictions on the number of people that can live in an apartment building.  The law is dictated by some local fire code.  The zoning and building laws go something like this.

What the city wants you to write a program that takes the number of floors in a building as input and computes the maximum occupancy of the building.  The requirements are that you: "construct" a building, "populate it", then total the occupants.  You may not count the residents when you populate the building.

 

Deliverables:

  1. The Java source code, printed.
  2. The test cases you ran and their output.

You may copy the output of your runs and paste them in a document

  1. An analysis of the running time of your program.  (i.e. an O(…))
  2. Bring your program to class and be prepared to run it.