Medium badge

MiniScript Expert Public


Demonstrated grasp of object-oriented programming in MiniScript.

Required Evidence

Write "Animals" program

Use OOP to create a small class hierarchy of animals and their behavior. More Info

Badge Overview

Object-oriented programming is an approach to programming that groups similar kinds of things into a hierarchy of classes that share common data and methods.
To earn this badge, demonstrate your mastery of object-oriented programming in MiniScript with a program that includes the following:
  1. An Animal class that defines a name property, an actVerb property equal to "walks", and an act verb that prints out a string that combines the name and the actVerb plus some string literals to print, for example: The animal walks around.
  2. A Bunny subclass of Animal.  This should override actVerb with the value "hops".
  3. An instance of Bunny that is given a unique name, e.g. "Fluffy".  Call the act method on this instance; it should print "Fluffy hops around."
  4. An additional subclass of either Animal or Bunny, of your own design.  Demonstrate it by creating an instance and telling it to act.
You may write this program in any MiniScript environment you like.  Submit your program to earn this awesome badge!

Badge Experts

Badge Learners