Programming for Kids - ZedLX

The Easiest Way to Learn Computer Programming

Getters [1/12]

Getters and Statement Lists

A getter is a member that produces a value.

Type num has a getter .int. It produces a value equal to the whole part of the given number. In other words, it returns the whole part of the number.

Type color has members .r, .g and .b. These three members are getters and setters, meaning that they can also be assigned a value.

Loading...