Skip to the content. Back to Chapter 4
<style> :not(ul) + ol { counter-reset: list-ctr; list-style-type: none; list-style-position: outside; } :not(ul) + ol > li { counter-increment: list-ctr; } :not(ul) + ol > li::before { content:"Q" counter(list-ctr) ". "; margin-left: -25px; } ol ul { list-style-type: lower-alpha; } ol ul ul { list-style-type: lower-roman; } ul ol, ol ol { list-style-type: circle; } ul { list-style-type: decimal; } ul ul { list-style-type: lower-alpha; } ul ul ul { list-style-type: lower-roman; }

Chapter 58

      1. Number of legs
      2. Colour of paws
      3. Colour of eyes
      4. Age
      5. Name
      1. Shortest side length
      2. Longest side length
      1. Start date
      2. End date
      3. Accomodation price per night
      4. Owner
  1.  // how dare you use 3-space indentation
     class Radio
         // instance variables
         private volume
         private station
         private switch
    
         public procedure new(aVolume, aStation, aSwitch)
             volume = aVolume
             station = aStation
             switch = aSwitch
         endprocedure
    
         public procedure setVolume(aVolume)
             volume = aVolume
         endprocedure
     endclass
    
  2.  robertsRadio = new Radio(0.3, 88.2, false)
     philipsRadio = new Radio(0.6, 37.4, true)
    
  3. squeak

  4.  class Rodent inherits Animal
         private colour
         public procedure new(aName, aPosition, aSize)
             super.new(aName, aPosition)
             // shame on the book for getting this wrong!
             size = aSize
         endprocedure
     endclass
    
  5. tom.position increases by 3 and jerry.position increases by 2

Exercises