1.3 Object-Oriented Programming GEMTRIX

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Get a hint
Hint

Implement setters and getters for the character type.

Get a hint
Hint

Represent properties, which are used to read, write, or compute a private field. These methods are usually public and allow you to access data

Get a hint
Hint

class Shirt

{

string material = "cotton";

}

Get a hint
Hint

First class keyword, then the class name, then a set of brackets, and within the brackets, and then create the variable

Card Sorting

1/18

Anonymous user
Anonymous user
encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

19 Terms

1
New cards

Implement setters and getters for the character type.

Represent properties, which are used to read, write, or compute a private field. These methods are usually public and allow you to access data

2
New cards

class Shirt

{

string material = "cotton";

}

First class keyword, then the class name, then a set of brackets, and within the brackets, and then create the variable

3
New cards

Delegate

An event to have an object signal an action's occurence.

Events go inside delegates, which provide a way to design and execute callbacks

4
New cards

Subscriber

A class that receives an event notification

5
New cards

EventHandler

Is a built-win delegate, which is a representative of a method with a particular parameter list and data type

6
New cards

Access Modifier : protected

If you want your data to be accessible by members of all derived classes

7
New cards

Access Modifier : private

8
New cards

Access Modifier : public

9
New cards

Access Modifier : derived

10
New cards

To instantiate a class

AreaRect areaRect1 = new AreaRect();

11
New cards

get

This method should replace the comment // access the private field. Is used to access a private field from within a public field

12
New cards

set

This method is used to assign a value to a private field

13
New cards

Public/Private Constructor

Is not needed when setting or returning a private variable

14
New cards

Generic Classes

Have operations that are not specific to a data type

Are used collections such as stacks, queues, hashed tables, and linked lists.

Have generic methods

15
New cards

Base Class

There is no set limit for how many classes can be derived from this class

16
New cards

Child Class

Cannot inherit from multiple parent classes

17
New cards

Derived Class

A class that inherits functionality from a base class

18
New cards

Abstract Class

Cannot be used to create objects.

Serves as a base for other classes to use its methods and have these classes have their own objects and methods

19
New cards

Interface

Contain abstract methods, meaning without a body

A class serves as a base for an interface

Can be implemented without using the override keyword