define_method is a method that allows you to create other…