Unit 4 Getting started with objects part 1 Flashcards

(5 cards)

1
Q

What are objects and classes

A

-Object is a thing
-Class is a concept or a type that things belong to
-Things/objects belong to the same concepts/classes when they share similar properties and behavior
-Class is like a blueprint that defines how something looks and behaves. Describes what attributes and what methods

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

What are properties and behaviors

A

-Properties are data that describes the object
-Behavior means for us to interact with the object. Processing or calculations that apply on the properties of the object in the form of methods

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

What are attributes or fields

A

An object has two capabilities, where an object can store data and an object can perform operations
-Attributes or fields is the data stored in an object

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

What are methods

A

-the operations that an object can perform

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

What is an instance

A

-An actual object created from a class, a real example of that blueprint
-Each instance of the string class contains different data
-The instances all share the same design
-Each instance has all the attributes and methods that were defined in the string class
-classes are defined to represent a single concept or service

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