Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

ApartmentComplex

Matthew Pohlmann edited this page Jan 1, 2014 · 1 revision

####Description An apartment complex in SimCity201. Contains Residences and is the work location of a Landlord.

####Class Signature

public class ApartmentComplex extends Structure {}

####Data

Landlord landlord;
List<Residence> apartments;

####Constructors

public ApartmentComplex (int x, int y, int width, int height, int id) {
    super(x, y, width, height, id);
    landlord = NULL;
}

####Methods

public void setLandlord(Landlord l) {
    landlord = l;
}
public Landlord getLandlord() {
    return landlord;
}
public List<Residence> getApartments() {
    return apartments;
}
public List<Residence> getVacantApartments() {
    List<Residence> vacantApartments;
    if Ǝ Residence r in apartmentsr.getResident()==NULL then,
	   vacantApartments.add(r);
    return vacantApartments;
}

Wiki Home | Design Home

Clone this wiki locally