class BodyMassIndex

Attributes

height[RW]
weight[RW]

Public Class Methods

new(weight, height) click to toggle source
# File lib/bmi-tmendoza.rb, line 5
def initialize(weight, height)
        @weight=weight 
        @height=height 
end

Public Instance Methods

calculate_index() click to toggle source
# File lib/bmi-tmendoza.rb, line 10
def calculate_index
        @wh = @weight / (@height * @height)   
        puts 'The Body Mass Index is: '+ @wh.to_s
end