Class: A1520mkExercise4::A1520mkExercise4
- Inherits:
-
Object
- Object
- A1520mkExercise4::A1520mkExercise4
- Defined in:
- lib/a1520mk_exercise4.rb
Class Method Summary collapse
Class Method Details
.getAge ⇒ Object
6 7 8 9 10 11 |
# 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) ⇒ Object
12 13 14 15 16 |
# File 'lib/a1520mk_exercise4.rb', line 12 def self.getBMI(wkg, tcm=170) tall = tcm/100.0 bmi = wkg/(tall*tall) return bmi end |