348 B
348 B
Creating Classes (#3)
Create a Robot
class with the following four member functions:
right(steps: Int)
, left(steps: Int)
, down(steps: Int)
and
up(steps: Int)
. Each function should display one of the following phrases
on the console:
Right N steps
Left N steps
Down N steps
Up N steps
where N is the provided number of steps.