Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Student < Person
- def initialize(firstName, lastName, id, scores)
- super(firstName)
- super(lastName)
- super(id)
- @scores = scores
- end
- def calculate()
- fin = scores/2
- puts "O" if fin >= 90 && fin <= 100
- puts "E" if fin >= 80 && fin < 90
- puts "A" if fin >= 70 && fin <= 80
- puts "P" if fin >= 55 && fin < 70
- puts "D" if fin >= 40 && fin < 55
- puts "T" if fin < 40
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement