Computing / Computer Science

Overview: 
Discussion of how to proceed with the following units depending on which robot hardware platform you are using.
Objectives: 

Determine what Unit to proceed to next.

Content: 

If you are using the EV3 platform, it is simple enough that you have learned enough Java to do some actual programming. You can skip to Unit 9 and start working on some EV3 example programs. As you proceed in the examples you may see Java concepts and constructs that are covered in Unit 8. After doing some of the examples you should return to Unit 8 and complete it as it covers topics that, while not needed to get started, likely will be needed as you write more serious robot programs. After completing Unit 8 and doing the examples you should also study Units 12 and 13 to learn still more about Java, enabling you to do more sophisticated robot programming.

If you are using the Tetrix or RoboRio platforms, you could skip to those Units and start working with the examples. However, you will quickly encounter concepts and constructs covered in Unit 8. If you can't resist starting to program and skip Unit 8, try to return to it as soon as possible, so you will know more about what you will be seeing in the example programs you will be working with. Units 12 and 13 should also be completed to give you a more complete picture of what you will be seeing in the examples and what you are likely to see if you look at the FIRST samples or code from other teams.

Navigation:

What's Next

If you are using the EV3 platform, it is simple enough that you have learned enough Java to do some actual programming. You can skip to Unit 9 and start working on some EV3 example programs. As you proceed in the examples you may see Java concepts and constructs that are covered in Unit 8. After doing some of the examples you should return to Unit 8 and complete it as it covers topics that, while not needed to get started, likely will be needed as you write more serious robot programs.

Packages and Imports

Classes within a project or in a library are organized into packages. A package is simply an identifier specified at the top of a class with the package statement. In a project, all classes with the same package name are grouped together under that name. Packages are important when we want to use libraries of classes published by other programmers, such as the Java Class Library or one of the robot specific libraries.

Overview: 
Introduction to packages and the import statement.
Objectives: 

Gain a basic understanding of packages and the import statement.

Content: 

Classes within a project or in a library are organized into packages. A package is simply an identifier specified at the top of a class with the package statement. In a project, all classes with the same package name are grouped together under that name. Packages are important when we want to use libraries of classes published by other programmers, such as the Java Class Library or one of the robot specific libraries. Packages resolve naming conflicts between classes and help programmers to locate the classes they would like to make use of in their programs.

So how do we make use of packages? If we want to use one or more classes in a package in our program, we tell Java which package (or constituent class) we want to use with the import statement. Placed at the top of our program, one or more import statements make the imported classes act like they are part of our program and we can work with those classes in our code.

You will see various package and import statements in the examples. Packages and importing them are discussed in more detail in Unit 8.

Navigation:

HMS STEM Robotics 101 EV3

HMS EV3 - Competitve Robotics Techniques

HMS EV3 - Menu Systems

HMS EV3 - Stall Detection

Pages