Lecture_03 Flashcards

(23 cards)

1
Q

What are the properties of Points in GIS?

A

Defined by their properties and their behavior/functions, have coordinates, can be asked about their distance to other points

The Point class itself does not have specific coordinates or distance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a Bounding Box in GIS?

A

Made from two points, requires creating two points to construct a bounding box object

The member variables are referred to as ul and lr.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the definition of a package in programming?

A

A grouping of related types providing access protection and name space management

Types refer to classes, interfaces, enumerations, and annotation types.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What do the keywords public and static signify in Java?

A

They control the visibility of methods and variables, which is different from their scope

For example, a variable defined inside a loop is not accessible outside of it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

True or False: Scope and visibility are the same concept.

A

False

Scope refers to the accessibility of variables and methods, while visibility pertains to access control.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What method do all objects in Java have?

A

toString()

This method is called whenever you print an object to the console.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is one reason for overriding the toString() method?

A

To create a pretty print output

This enhances the readability of object representations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Fill in the blank: A playing field is needed for _______.

A

Zombies

This refers to a programming exercise involving a game simulation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is an ArrayList in Java?

A

A list implementation based on arrays, allowing parameterized types

Example: ArrayList<Building> b = new ArrayList<Building>();</Building></Building>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What method is used to add new elements to an ArrayList?

A

add(e<T>)</T>

This method allows adding elements of type T to the list.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a common method to iterate over elements of a list?

A

Using an Iterator

Example: Iterator iterator = arrayList.iterator();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

List some common ArrayList methods.

A
  • boolean add(E e)
  • boolean contains(Object o)
  • E get(int index)
  • int indexOf(Object o)
  • boolean isEmpty()
  • Iterator<E> iterator()</E>
  • E remove(int index)
  • int size()
  • Object[] toArray()
  • subList(int fromIndex, int toIndex)

There are many more methods available.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How can you append a point to a Polyline?

A

By adding the point to the sequence of points that make up the Polyline

This involves using specific methods to manipulate the data structure.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the focus of the epidemic simulation discussed?

A

Creating a simple SIR simulation

The simulation is based on abstraction and generalization.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is a suggested assignment for the epidemic simulation?

A

Create a class for people that are either susceptible

This involves modeling different states within the simulation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are the three categories of people in the SIR simulation?

A

Susceptible, Infectious, Recovered/Removed

These categories represent the states of individuals in the simulation of disease spread.

17
Q

What type of area should be defined for the SIR simulation?

A

A rectangular study area

This area will be used to select individuals for the simulation.

18
Q

What will be randomly assigned to people in the simulation?

A

Location

The location assignment will be done without implementing continuous movement at this stage.

19
Q

What happens to susceptible people within a radius of x meters from an infectious person?

A

They become infected with a chance of y

This infection mechanism is a key aspect of the disease spread model.

20
Q

What should not be attempted yet in the simulation development?

A

Running a simulation

The focus is currently on coding and testing rather than executing the simulation.

21
Q

What keyword should be reviewed in the assigned chapters of the book?

A

Static

Understanding this keyword is essential for working with class-level variables and methods in Java.

22
Q

What type of list is mentioned for use in the simulation?

A

ArrayList

This data structure is part of the Java Collections Framework and is used to store dynamic arrays.

23
Q

What class from the Java API should be familiarized with?

A

Arrays class

This class provides various methods for manipulating arrays in Java.