Class Flashcards

1
Q

What are the fundamental concepts that Java supports as an Object Oriented Language?

A
  • Polymorphism
  • Inheritance
  • Encapsulation
  • Abstraction
  • Classes
  • Objects
  • Instance
  • Method
  • Message Parsing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

It is like a blueprint for creating objects

A

Class

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

It specifies an object’s attributes and defines its behaviors as methods

A

Class

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

How to reference a data member/function?

A
  • Stating the name of the object reference, followed by a period (dot), followed by the name of the member inside the object
  • objectReference.member
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How to call a method for an object?

A
  • naming the object followed by a period (dot), followed by the name of the method and its argument list
  • objectName.methodName(arg1)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

An instance of a class

A

Object

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

Syntax for creating an object

A

classname objectname = new classname();

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

Identify the parts of the following line:
A.length = 10;

A

A - Object name
length - Object attributes

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

Identify the parts of the following line:
Rectangle B = new Rectangle();

A

Rectangle - Class name
B - Object name

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

Identify the parts of the following line:
A.ComputePerimeter();

A

A - Object name
ComputePerimeter(); - Object Methods

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