Gym Instructors

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)

_addressaddressinstructor address
_fNamestringfirst name
_lNamestringlast name
_fieldstringfield of specialization

getInstructor - returns the info of an instructor specified by address

_addressaddressinstructor 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

_addressaddressinstructor address
Reviewed by Modex
Buy Contract Test Contract

Create an account or login to purchase this smart contract