Skip to content

Commit

Permalink
Implement Teacher class inheriting from Person
Browse files Browse the repository at this point in the history
  • Loading branch information
kessie2862 committed Jul 31, 2023
1 parent cddf73e commit 55d0050
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions teacher.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
require_relative 'person'

class Teacher < Person
attr_accessor :specialization

def initialize(age, specialization, name = 'Unknown', parent_permission: true)
super(name, age, parent_permission)
@specialization = specialization
end

def can_use_services?
true
end
end

0 comments on commit 55d0050

Please sign in to comment.