Assignment with class methods and variables