For these questions, write a short description or snippet of code that meets the requirement. In cases where the question mentions a “given” data value, use the variable given to refer to it (instead of re-writing the information).
-
Give one difference between Modules and Classes. Classes create an object - Modules only modify objects
-
Defining Modules
First, create a module Doughy which defines a method has_carbs? that always returns true. Then, given the following Pizza class, update Pizza to use your new Doughy module to gain the defined has_carbs? behavior. module Doughy def has_carbs?