Chapter 28 Flashcards

(22 cards)

1
Q

Attributes

A

They describe an objects appearance

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

The current state of an object

A

the current value of all of its attributes.

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

abstraction

A

A representation of the appearance and behaviour of an object in a computer program

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

A class

A

a template that describes the structure of an object. We
cannot create an object before its structure is defined.

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

Instances of a class

A

Individual members of a class

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

Classes make provision for

A

-Attributes (data fields)
-Properties (indirect access to data fields)
-Methods (behaviour)

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

Members

A

The fields, properties and methods of a class a

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

Client

A

A piece of code that uses
another piece of code.

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

interface

A

-They defines the members of a class without specifying details thereof.

-They may contain only properties and methods

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

Abstract class

A

-It provides a structure from which concrete classes can inherit.

-We cannot instantiate an object from an abstract class directly,but rather through a derived class.

-An abstract class is a bit of a hybrid between an interface and a base class as it defines the members but may also provide the details thereof.

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

Static class

A

-It is one from which no instance can be created.

-The properties and methods of a static class are qualified by the class name and not an object.

  • A static class should only be used when we want to encapsulate operation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

A struct

A

-Its like a class with the main difference being the way in which it is saved in memory

-A struct instance contains the data itself

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

We refer to classes as

A

Reference types

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

We refer to structs as

A

Value types

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

A constructor

A

A method that is used when an instance of a class is created (object is
instantiated).

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

Signature

A

The signature of a method refers to its name and the parameter types

17
Q

Overloading

A

Method with the same name but different signatures

18
Q

An abstract method

A

-It has no implementation (body)

-It must be overridden in derived classes providing an implementation for it

19
Q

A virtual method

A

-It has implementation but it may be overriden in derived classes

20
Q

Camel case

A

The writing of separate words in an identifier without spaces with each succeeding word starting with a capital.

-The first letter may be either lowercase or
uppercase

21
Q

Pascal case

A

A special version of camel case with the added requirement that the first letter
must be uppercase.

22
Q

The Hungarian notation i

A

The same as camel case but with the requirement that the identifier
starts with a prefix to indicate the type or class of the object or variable