Using Objects - GridWorld and Java Basics (Unit 2)

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

1/49

flashcard set

Earn XP

Description and Tags

Vocabulary flashcards covering GridWorld concepts, Java basics, and object-oriented terminology from the lecture notes.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

50 Terms

1
New cards

GridWorld

A Java-based grid environment used in this course to learn object-oriented concepts, featuring Actors like Bugs and Rocks.

2
New cards

CSP-GridWorld.jar

The Java ARchive file that provides the GridWorld library for the project.

3
New cards

GridWorld Workspace.jcw

A GridWorld workspace file opened by JCreator to run a GridWorld project.

4
New cards

Workspace

An IDE area that organizes projects, files, and settings.

5
New cards

Active Project

The project currently selected for building and running.

6
New cards

BugRunner

A program/class that runs GridWorld bugs and demonstrates behaviors.

7
New cards

Grid location

A specific cell in the GridWorld grid, identified by a coordinate.

8
New cards

0-based indexing

Rows and columns are numbered starting at 0.

9
New cards

(row, column) pair

The representation used for a grid location in GridWorld.

10
New cards

Actor

A base class for things that exist on the GridWorld grid and may act.

11
New cards

Bug

A movable Actor subclass representing an insect in GridWorld.

12
New cards

Rock

A non-movable Actor subclass representing a rock obstacle.

13
New cards

Class

A blueprint for creating objects, defining data and behavior.

14
New cards

Object

An instance created from a class, with data and operations.

15
New cards

Parameter

Information required by a method to perform its task.

16
New cards

Argument

Actual data supplied to a method when it is called.

17
New cards

Method

A sequence of instructions an object follows to perform a task.

18
New cards

Return Value

The data produced by a method after it completes.

19
New cards

void

Return type indicating a method does not return a value.

20
New cards

H pattern

A design pattern formed with rocks/flowers for a BugRunner exercise.

21
New cards

java.awt.Color

Java class used to specify colors for objects in GridWorld.

22
New cards

Location

A class representing a grid position, typically with row and column.

23
New cards

Constructor

A special method used to create and initialize an object.

24
New cards

Overloaded

A method with multiple definitions that differ by parameter lists.

25
New cards

world.add(location, actor)

A GridWorld method to place an actor at a given location in the world.

26
New cards

Import

A statement to bring a class or package into scope for use.

27
New cards

Package

A namespace grouping related classes.

28
New cards

Java API

The official Java library of classes and interfaces provided by Oracle.

29
New cards

Accessor method

A method that retrieves data without changing the object.

30
New cards

Mutator method

A method that changes the object's data.

31
New cards

Simple Numeric Types

Primitive numeric types such as int and double.

32
New cards

int

Primitive type for whole numbers.

33
New cards

double

Primitive type for floating-point real numbers.

34
New cards

String

A sequence of characters used to represent text.

35
New cards

Concatenation

Joining two strings into one using the + operator.

36
New cards

length()

String method that returns the number of characters in the string.

37
New cards

Declaration

Statement that introduces a variable by its type and name.

38
New cards

Initialization

Assigning an initial value to a variable.

39
New cards

Assignment operator

The equals sign (=) used to assign a value to a variable.

40
New cards

Identifier

The name assigned to a variable, class, or method; must follow naming rules.

41
New cards

Reserved word

A Java keyword with a special meaning (e.g., int, public).

42
New cards

Java naming conventions

Standards: Class names in PascalCase; variables/methods in camelCase; constants in ALL_CAPS.

43
New cards

Comments

Annotations in code ignored by the compiler to aid human readers; types include single-line, multi-line, and Javadoc.

44
New cards

Javadoc

Documentation-style comments that can be extracted to create API docs; starts with /**.

45
New cards

File Heading

A 6-item Javadoc block at the top of a source file describing the class and collaborators.

46
New cards

Object variables

Variables that hold references to objects (memory addresses), not the objects themselves.

47
New cards

Importing a single class

Syntax: import PackageName.ClassName; to bring one class into scope.

48
New cards

Importing multiple classes from a package

Syntax: import PackageName.*; to bring all classes from a package into scope.

49
New cards

Strings (general)

String is a sequence of characters used to represent text.

50
New cards

Color constants

Predefined colors like Color.GREEN used to set object colors.