Comp Sci Ch. 2 Flashcards

This flashcard deck was created using Flashcardlet's card creator

0
Q

What is an attribute?

A

An objects values that represent its state

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

What is an object?

A

Part of a java program that represents a real object

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

What is a method?

A

A group of programming statements given a name so we can use them when we need them

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

What is a class?

A

The data-type/blueprint of an object. Represents a concept

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

What is encapsulation?

A

The means by which an object protects and manages its own info

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

What is inheritance?

A

The means by which a class can be created by other classss

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

What is polymorphism?

A

The idea by which we we can refer to objects if different but related types in the same way

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

What do we directly interact with in programs?

A

Objects

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

Can there be multiple objects in a class?

A

Yes

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

What do methods do?

A

The functions of the program

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

This is when one class can be used to derive other classes

A

Inheritance

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

What is object and method in system.out.println (“hello world”) ?

A

System.out is object. Println is method. Hello world is parameter

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

Where does the info we feed into a method considered?

A

Parameter

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

What is abstraction?

A

Hiding details

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

How do we know if something is abstract?

A

We don’t need to think about the inner workings

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

What is a character string in java?

A

An object

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

What can you not do with a literal string?

A

Break it across two lines

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

What is contametation?

A

Splicing together multiple strings

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

What does a concatenator do?

A

String together numbers and letters working left to right

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

What do you use parentheses for in a concatenator?

A

To add stuff

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

What is an escape sequence?

A

A series of character that represent a special character

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

What is a variable a name for?

A

A location in memory

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

How do you declare a variable?

A

Specify it’s name and the info it will hold

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

What changes the value of a variable?

A

An assignment statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
What must you specify when using a variable?
The variable type
25
What just you make sure you don't do when reassigning a variable?
Not put a data type again
26
What does putting final before a data type do?
Make it a constant
27
What are the data types for intergers?
Byte, short, int, and long
28
What are the data types for numbers with decimals?
Float and double
29
What is the data type for characters?
Char
30
What is the Boolean data type?
Boolean
31
What are booleans good | For?
True and false statements
32
What is a trade off of double?
It only allows 15 sig figs
33
What does % mean in java?
Remainder
34
What does the char function use?
Unicode
35
Why is the assignment operater a low precedence?
Cause the right side is finished then a value is assigned
36
What is a widening conversion?
Going from a data type with less bits to more bits
37
What is a bad data type conversion?
Int to double
38
What are 3 types of conversions?
Assignment, arithmetic promotion, and casing
39
What is assignment conversion?
Assigning an Internet variable to a double variable
40
What is arithmetic promotion?
Dividing a double and an interger to get another double?
41
What is casting?
Doing something and specifying the output data type
42
What are enumerated values?
Values outside of a class and the main method
43
What happens when we say to string something?
Memory is allocated for it
44
What is the process of creating an object?
Instantiation
45
Are strings powerful?
Yes
46
What do strings have on their own?
Their own class
47
What do index numbers start at?
0
48
What are strings?
Objects that you can use methods on, so they have special functionalities
49
How are interferes and doubles made into objects?
Wrapper class
50
What is autoboxing?
Converting a primitive data type into an object
51
What is a class library?
A collection of classes that contain methods
52
What is the java standard class library?
Additional functionalities that come with java
53
What classes are included in the java standard class library?
System and string
54
What is a package?
A collection of classes, methods, and more that can be shared with others
55
What do you do to use classes not readily in java?
Import them
56
What does a * mean?
The wild card-import all classes in a package
57
What is the scanner class?
A part of java.util that let's us get input from the user
58
What do applets not have?
A main method
59
What is an applet?
A java app meant to be run in a web browser