Homework completed.

I will add a method empty() in the Apartment class.

On Tue, Nov 11, 2014 at 11:23 PM, Hubert Lee <notifications@github.com>
wrote:

> In Chris_Cheuk/Week 3 homework/apartment/lib/building.rb:
>
> > +class Building
> > +	attr_accessor :name, :address, :apartments
> > +
> > +	def initialize(name,address)
> > +		@name=name
> > +		@address=address
> > +		@apartments=[]
> > +	end
> > +
> > +
> > +	def view_apartments
> > +		puts "-------#{@name} Apartment List-------"	
> > +		apartments.each do |index|
> > +		
> > +		   puts "#{index}"
> > +		   if index.renter.nil? then puts "the apartment is empty" end
>
> Rather than separately determining if the apartment is empty, the
> apartment itself should be making this determination. How can you put this
> code inside the Apartment class?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/ga-students/BEWD_2_HK/pull/18/files#r20156283>.
>