title: what will be output of given code
body: <p>Given the following code:</p>
  
  <pre><code>  class Book
      attr_accessor :author
      attr_reader :title
      attr_writer :comments
      def initialize(author, title)
        @author = author
        @title = title
        @comments = []
      end
    end
  
    book = Book.new("Chuck Palahniuk", "Fight Club")
  </code></pre>
  
  <p>Which of the following snippets of code are valid?</p>
  
  <p>1."#{book.title} was written by #{book.author}."</p>
  
  <p>2.book.comments &lt;&lt; "#{book.title} was a good book"</p>
  
  <p>book.comments.each { |comment| puts comment }</p>
  
  <p>book.title = "Cooking Club"</p>