Unit 1 - Java Robotics Lab Vocabulary

0.0(0)
studied byStudied by 0 people
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/36

flashcard set

Earn XP

Description and Tags

Vocabulary flashcards covering Java basics, object-oriented concepts, constructors, inheritance, maps, and lab-specific conventions.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

37 Terms

1
New cards

Comment line

A line starting with // that the compiler ignores; used to annotate code.

2
New cards

import

Statement to bring in classes from other packages so you can use them in your program.

3
New cards

class

A blueprint/container for code that defines fields and methods for objects.

4
New cards

main method

The entry point of a Java program: public static void main(String[] args); statements run in order.

5
New cards

Display.openWorld

A class method that loads a map into the graphics window.

6
New cards

Display.setSize

Sets the size of the display window (width by height).

7
New cards

Display.setSpeed

Controls the execution speed of robot actions in the display.

8
New cards

Robot

A class representing a robot; used to create robot objects with new Robot().

9
New cards

instantiation

Creating an object from a class using the new keyword.

10
New cards

object reference

A name that points to an instantiated object (e.g., karel is a reference to a Robot instance).

11
New cards

dot notation

Calling a method on an object using objectName.method().

12
New cards

constructor

A special method that initializes a new object; has the same name as the class and no return type.

13
New cards

super

A call inside a subclass constructor to invoke the superclass constructor and initialize inherited fields.

14
New cards

inheritance

A relationship where a subclass gains fields and methods from a superclass (extends).

15
New cards

isa relationship

Label used in UML to indicate an inheritance (is-a) relationship.

16
New cards

has-a relationship

Label used in UML to indicate composition (has-a); one object contains another.

17
New cards

driver class

A class that contains the main method and drives the program by creating objects and issuing commands.

18
New cards

resource class

A class whose methods must be invoked on instantiated objects; not runnable by itself.

19
New cards

static

Modifier for class methods (not tied to an instance), e.g., main() or Display.setSize().

20
New cards

bytecode

The compiled .class form of Java source that runs on the Java Virtual Machine.

21
New cards

javac

The Java compiler that translates .java files into .class bytecode.

22
New cards

java

The runtime launcher that runs a class by invoking its main method.

23
New cards

identifier

A name for a class, method, or variable; cannot start with a number and is case-sensitive; cannot be a Java keyword.

24
New cards

naming conventions

Class names start with uppercase; methods/variables start with lowercase; constants are ALL CAPS.

25
New cards

Cartesian coordinate system

Maps use coordinates; the bottom-left corner is (1, 1).

26
New cards

Unit1/maps

Folder containing predefined map files used by the labs.

27
New cards

instantiate

To create an instance of a class using new.

28
New cards

definite iteration

Repeating a block a fixed number of times using a for-loop.

29
New cards

for-loop syntax

for (initialization; condition; update) { … } for definite iteration.

30
New cards

actual argument

The value passed to a method when it is called.

31
New cards

formal argument

The parameter in a method signature that receives the actual argument.

32
New cards

default constructor

A no-argument constructor that creates an object in its default state.

33
New cards

four-argument constructor

A constructor that takes four parameters and passes them up to the superclass with super.

34
New cards

no-suitable-constructor error

Compiler error when the arguments do not match any constructor in the class hierarchy.

35
New cards

one-argument constructor

A constructor that takes a single parameter to initialize a field.

36
New cards

class method

A method defined as static; belongs to the class, not to any object.

37
New cards

arena map

A specific 10x10 map used in Lab04 for demonstrations.