The leJOS Tutorial
Previous Page Lesson Contents Next Page Start of Tutorial > Start of Trail

Trail: Getting Started

Solutions to the Exercises: Getting Started

Exercise 1: What is leJOS?

Answer: (b) leJOS is an operating system and Java-based language for the RCX.

Exercise 2: What is the entry point for a leJOS program running on the RCX?

Answer: (a) the entry point for a leJOS program running on the RCX is public static void main(String[] args).

Exercise 3: Where can I find additional information regarding leJOS?
Answer: there are several resources, e.g.

Exercise 4: What is the correct constructor call?

Answer: (d) the Motor class has no public constructor, but offers several static methods.

Exercise 5: Change the simple sample application so that it displays "LEJOS" on the LCD.
Answer: change the line
TextLCD.print("DRIVE");
to
TextLCD.print("LEJOS");

Exercise 6: Change the simple sample application so that the motor runs backwards.
Answer: change the line
Motor.A.forward();
to
Motor.A.backward();


The leJOS Tutorial
Previous Page Lesson Contents Next Page Start of Tutorial > Start of Trail