GymInstructors.md 1.2 KB

Contract purpose

This contract can be used to manage the situation of gym instructors in a gym.

Exposed methods and variables

Instructor : holds all info regarding an instructor (first name, last name, age and field of specialization)

instructors : holds a mapping of adresses to GymInstructors instructorAccounts : holds all the addresses

setInstructor - sets the info for a new instructor(can only be called by the owner of the contract)

parameter_name type details
_address address instructor address
_fName string first name
_lName string last name
_age uint256 age
_field string field of specialization

getInstructor - returns the info of an instructor specified by address

parameter_name type details
_address address instructor address

getInstructors - returns all the adresses of the instructors

countAllInstructors - returns the total number of instructors

checkField - checks if a certain instructor is specialized in a certain field

parameter_name type details
_address address instructor address
_field string field