Skip to content

Instantly share code, notes, and snippets.

@RobAWilkinson
Created April 8, 2015 05:44
Show Gist options
  • Save RobAWilkinson/9e153cd77b13766b9c73 to your computer and use it in GitHub Desktop.
Save RobAWilkinson/9e153cd77b13766b9c73 to your computer and use it in GitHub Desktop.
Quiz_question.md

Create and show examples of inheritance with 3 seperate classes

  • Vertebrate which has a method has_spine? which returns true
  • Reptilia which extends Vertebrate has a method cold_blooded? which returns true
  • Aves which can fly but is not cold blooded.

Each of these classes should be able to be given and find out its name

@wesr7
Copy link

wesr7 commented Apr 8, 2015

class Vertebrate
def initialize
@has_spine == true
end
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment