What is one way to start new programming project on Java? You can click file – new – Java Project – double click the new project file – right click src – new class and there you have it.
What is an API? Application Programming Interface is a library that contains specification for routines, data structures, object classes, and variables.
What is a getter and a setter? Accessors (also known as getters and setters) are methods that let you read and write the value of an instance variable of an object. (http://java.dzone.com/articles/getter-setter-use-or-not-use-0).
What are the different languages for the Mindstorm NXT?
What language will you be using to program your robot? Java, Lua, Labview, RobotC.
What is a prototype? A prototype is the draft of a project, kinda like a skeleton. A car that works that it doesn’t have all of the fancy chassis and paint jobs.
Explain to someone how you swap 2 values in Java? You need three stalls to swap variables. Stall1, Stall 2 and a Tempstall. First you assign Stall1 to the tempstall. then you assign stall2 to the now empty (assigned to the tempstall) stall1. lastly you assign the tempstall which contains the original stall1 variable to the stall2. Here’s the code.
static void swap(String s1, String s2){
String temp = s1;
s1=s2;
s2=temp;
}
public static void main(String[] args) {
String s1 = "Hello", s2 = "world";
swap(s1, s2);
System.out.println(s1 + s2);
}
How does selection sort use 2 for-loops? The first loop scans over the array, looking for the next number in the array. Once found the second loop comes around, picks it up and sets it in the right place.
How do you print all the values from an array? With this code. system.out.println(array[i])
What is the difference between a thermometer and a thermostat? A thermometer checks the temperature and the thermostat is what senses the temperature and controls it so that it stays in the desired range.
Why is plagiarism bad? Because you are just copying the text but not really learning it.
How do you avoid looking like you are stealing someone’s code? You can cite the site and make little changes to the code.
What are a few things you can do if you get really confused, lost, or stuck when trying to program? You can ask a teacher or google it. If you’re lost then you can just restart.
