# Exercise starting on page 36

# obj = Object.new

# def obj.talk
#   puts "I am an object."
#   puts "(Do you object?)"
# end

# obj.talk

# def obj.c2f(c)
#   c * 9.0 /5 +32
# end

# puts obj.c2f(100)

ticket = Object.new

def ticket.date
  "01/02/03"
end

def ticket.venue
  "Town Hall"
end

def ticket.event
  "Author's Reading"
end
def ticket.performer
  "Mark Twain"
end
def ticket.seat
  "Second Balcony, row J, seat 12"
end
def ticket.price
  "5.50"
end

def ticket.availability_status
  "sold"
end

def ticket.available?
  false
end

# puts "This ticket is for: " + ticket.event + ", at " + ticket.venue + ", on " + ticket.date + ".\n" + "The performer is " + ticket.performer + ".\nThe seat is " + ticket.seat + ", and it costs $" + ticket.price.to_s + "."

puts "This ticket is for: #{ticket.event}, at #{ticket.venue}, on #{ticket.date}.\nThe performer is #{ticket.performer}.\nThe seat is #{ticket.seat}, and it costs $#{ticket.price}."

if ticket.available?
  puts "You're in luck!"
else
  puts "Sorry-- that seat has been #{ticket.availability_status}."
end