When programming a robot how would one include two classes?

Post your NXJ projects, project ideas, etc here!

Moderators: roger, imaqine, 99jonathan

Instantclassic
New User
Posts: 1
Joined: Mon Apr 27, 2009 6:18 pm

When programming a robot how would one include two classes?

Postby Instantclassic » Mon Apr 27, 2009 7:34 pm

Topic.

To elaborate, I was thinking of designing a robot that use both a motion sensor and also a pen/ lever class to lift an object.

lawrie
leJOS Team Member
Posts: 953
Joined: Mon Feb 05, 2007 1:27 pm

Postby lawrie » Thu May 07, 2009 8:34 pm

Its like any other Java project. Create public classes in their own files and refer to them (directly or indirectly) from your main program and they will be included in the program uploaded to the NXT. The BumperCar sample uses multiple classes.


Return to “NXJ Projects”

Who is online

Users browsing this forum: No registered users and 1 guest

cron