class A1520mkExercise4::A1520mkExercise4
Public Class Methods
getAge()
click to toggle source
# File lib/a1520mk_exercise4.rb, line 6 def self.getAge a = Date.new(1962, 7, 9) b = Date.today d = b - a return (d/365).to_i end
getBMI(wkg, tcm=170)
click to toggle source
# File lib/a1520mk_exercise4.rb, line 12 def self.getBMI(wkg, tcm=170) tall = tcm/100.0 bmi = wkg/(tall*tall) return bmi end