C#: Ch. 9: Using Classes and Objects

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

"public"

A class access modifier that means access to the class is not limited.

"private"

A class access modifier that means access is limited to another class to which the class belongs. In other words, a class can be this if it is contained within another class, and only the containing class should have access to this class.

"internal"

A class access modifier that means access is limited to the assembly to which the class belongs.

"protected"

A class access modifier that means access to the class is limited to the class and to any classes derived from the class.

constructor initializer

A clause that indicates another instance of a class constructor should be executed before any statements in the current constructor body.

interface

A collection of abstract methods (and perhaps other members) that can be used by any class, as long as the class provides a definition to override the interface's do-nothing, or abstract, method definitions.

parameterless constructor

A constructor that takes no arguments.

information hiding

A feature found in all object-oriented languages, in which a class's data is private and changed or manipulated only by its own methods.

backing field

A field that has a property coded for it.

assembly

A group of code modules compiled together to create an executable program.

property

A member of a class that provides access to a field of a class; they define how fields will be set and retrieved.

constructor

A method that instantiates (creates an instance of) an object.

implicit parameter

A parameter that is undeclared and gets its value automatically.

default constructor

A parameterless constructor.

class client or class user

A program or class that instantiates objects of another prewritten class.

auto-implemented property (automatic property)

A property in which the code within the accessors is created automatically. The only action in the set accessor is to assign a value to the associated field, and the only action in the get accessor is to return the associated field value.

reference type

A type that holds a memory address.

invoking object

An object that calls an instance method.

state

An object's set of contents of its fields.

getter

Another term for a class property's get accessor.

setter

Another term for a class property's set accessor.

contextual keywords

Identifiers that act like keywords in specific circumstances.

instance variables

In a class, these are the data components that exist separately for each instantiation.

accessors

In properties, they specify how a class's fields are accessed.

fields

Instance variables within a class.

instance methods

Methods that are used with object instantiations.

instance

One individual object of a class.

this reference

The reference to an object that is implicitly passed to an instance method of its class.

composition

The technique of using an object within another object.

default value of an object

The value initialized with a default constructor.

get accessors

These access object fields that allow retrieval of a field value by using a property name.

set accessors

These assign object fields that allow the use of the assignment operator with a property name.

object initializer

This allows you to assign values to any accessible members or properties of a class at the time of instantiation without calling a constructor with parameters.

destructor

This contains the actions required when an instance of a class is destroyed.

IComparable interface

This contains the definition for the CompareTo() method.

class header or class definition

This describes a class and contains an optional access modifier, the keyword "class", and any legal identifier for the name of the class.

class access modifier

This describes access to a class.

has-a relationship

This is created using composition because one class "has an" instance of another.

CompareTo() method

This method of the IComparable interface compares one object to another and returns an integer.

read-only property

This property only has a get accessor, not a set accessor.

instantiate

To create an object.

value types

Types that hold values; they are predefined types such as "int", "double", and "char."

instantiation

When a class creates an object.

overrides

When a method does this, it takes precedence over the method, hiding the original version.


Kaugnay na mga set ng pag-aaral

Section 7, Unit 4: Mortgage Lending Tax Impacts

View Set

Chapter 11 - Death And Bereavement

View Set

Lecture 10 (31/3) - Initiation, Planning

View Set