PF 101: C# Object-Oriented Programming Concepts

0.0(0)
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/87

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.

88 Terms

1
New cards

Method

A block of code which only runs when it is called.

2
New cards

Code Reusability

Define the code once, and can be used many times.

3
New cards

Access Modifiers

Keywords that are used in order to specify the accessibility of the methods.

4
New cards

Class Visibility: Public

Public members can be directly called once the object is created.

5
New cards

Class Visibility: Private

Private members called within a method and it is not visible when object is created.

6
New cards

Method Overloading

C# allows multiple methods to have the same name but with different signatures.

7
New cards

Static Methods

Can be called without creating an object of the class.

8
New cards

Optional Parameters

C# allows specifying default values for parameters, which makes them optional when calling the method.

9
New cards

Math Function: Round()

Rounds a number to the nearest integer or specified number of decimal places.

10
New cards

Math Function: Sqrt()

Returns the square root of a number.

11
New cards

Math Function: Pow()

Returns the value of x to the power of y.

12
New cards

Math Function: Abs()

Returns the absolute value of a number.

13
New cards

Length (String)

Gets the number of characters in a string.

14
New cards

String Manipulation: ToUpper() / ToLower()

Converts a string to upper or lower case format.

15
New cards

String Manipulation: Contains()

Checks if a string contains a specific substring.

16
New cards

String Manipulation: Replace()

Replaces all occurrences of a substring with another string.

17
New cards

String Manipulation: Substring()

Retrieves a portion of the string.

18
New cards

Array Functions: Length (Array)

Returns the number of elements in the array.

19
New cards

Array Functions: Sort()

Sorts the elements of an array in ascending order.

20
New cards

Array Functions: IndexOf()

Returns the index of the first occurrence of an element.

21
New cards

Type Convertion: ToInt32()

A static method provided by C# to convert a string to a 32-bit signed integer

22
New cards

Type Convertion: ToDouble()

Converts the value of the specified object to an double-precision floating-point number, using the specified culture-specific formatting information.

23
New cards

Type Convertion: ToString()

Returns a string that represents the object instance. Used to construct a string containing the information on an object that can be printed.

24
New cards

Type Convertion: Parse()

Converting a value from one data type (usually a string) to another type (like int , float , double , etc...)

This is common when working with user input, as data from Console.

25
New cards

Control Structures

A way to specify flow of control in any algorithm or program can be more clear and understood, it analyzes and chooses in which direction a program flows based on certain parameters or conditions

26
New cards

Sequential Logic

It follows a serial or a sequence flow.

27
New cards

Selection Logic

Allows one set of statements to be executed if a condition is true and another set of actions to be executed if a condition is false.

28
New cards

Iteration Logic

Employs a loop which involves a 'REPEAT Statement'.

29
New cards

For Loop (Iteration)

A for loop repeats a block of code a specific number of times or iterates over a collection of items (like lists or arrays).

30
New cards

While Loop

Repeats a block of code as long as a given condition is true. It is typically used when the number of iterations is not known in advance.

31
New cards

Encapsulation

The concept of bundling the data and methods that operate on the data within one unit.

32
New cards

Inheritance

The mechanism by which one class can inherit properties and methods from another class.

33
New cards

Polymorphism

The ability of an object to take on many forms.

34
New cards

Abstraction

The concept of hiding the complex reality while exposing only the necessary parts.

35
New cards

Object-Oriented Programming (OOP)

Programming paradigm based on objects and classes.

36
New cards

Classes

Containers for data attributes and methods.

37
New cards

Objects

Instances of classes containing specific data.

38
New cards

Constructors

Special methods invoked when class objects are created.

39
New cards

Type Casting

Assigning a value from one data type to another.

40
New cards

Implicit Casting

Automatically converting smaller types to larger types.

41
New cards

Explicit Casting

Manually converting larger types to smaller types.

42
New cards

Data Types

Classifications of data that determine storage size.

43
New cards

Operators

Symbols that perform operations on variables.

44
New cards

C#

Programming language used for Windows applications.

45
New cards

Comments

Annotations in code for clarity and explanation.

46
New cards

Exception Handling

Mechanism to handle runtime errors gracefully.

47
New cards

Try-Catch Method

Used to catch and handle exceptions in code.

48
New cards

Windows Forms

Framework for building Windows desktop applications.

49
New cards

Event-Driven Programming

Programming paradigm based on events and actions.

50
New cards

String

Variable containing a collection of characters.

51
New cards

Value Type

Data types holding values in their own memory.

52
New cards

Reference Type

Data types holding references to memory locations.

53
New cards

Overflowing

Condition when a calculation exceeds data type limits.

54
New cards

Identifiers

Names used to identify variables and functions.

55
New cards

Naming Convention

Rules for naming identifiers in programming.

56
New cards

Naming a Constructor

Constructors have the same name as the Class.

57
New cards

Implementing a Default Constructor

When you create a default constructor, you can SET an initial value of the class itself.

58
New cards

Copy Constructors

Constructors that copy itself.

59
New cards

Private Constructors

Preventing to implement this specific constructor, while implementing Encapsulation.

60
New cards

Static Constructor

You can only invoke this static Constructor...ONCE.

61
New cards

String Length

Find the length of the string 'Swim' Total char = 4.

62
New cards

Concatenating Strings

You can concatenate strings using the + operator.

63
New cards

String Interpolation

Using the '$' symbol before a string, allowing us to embed expression directly in a string.

64
New cards

String Methods

These methods help you manipulate and analyze string data.

65
New cards

String Comparison

Compare strings using methods like Equals, Compare, and CompareOrdinal for various types of string.

66
New cards

String Formatting

Using methods like 'string.Format' or interpolated strings for more complex formatting tasks.

67
New cards

Null vs. Empty Strings

Null string reference means the variable does not point to any string object, while an empty string is a valid string with no characters.

68
New cards

Variable

A name given to a storage location in memory. A data item whose value can change during the program's execution.

69
New cards

Constant

An immutable value. A data item whose value cannot change during a program execution.

70
New cards

Assignment Operator

Used to ASSIGN values to variables and to UPDATE the value of a variable.

71
New cards

Arithmetic Operator

Used to perform basic MATHEMATICAL OPERATIONS on numeric values.

72
New cards

Relational Operators

Used to COMPARE two values or expressions and return a boolean result.

73
New cards

Logical Operators

Used to PERFORM logical operations on Boolean values or expressions.

74
New cards

Expression

In C#: combination of operands (variables, literals, method calls) and operators that can be evaluated to a single value.

75
New cards

Camel Case

A naming convention where the first letter of the first word is lowercase and the first letter of each subsequent word is uppercase.

76
New cards

Pascal Case

A naming convention where the first letter of each word is capitalized.

77
New cards

Hungarian Notation

A naming convention that prefixes variable names with a type indicator.

78
New cards

Value Assignment

Can be assigned new values.

79
New cards

Scope

Determines where in the code variables can be accessed.

80
New cards

Lifetime

Duration during which a variable exists in memory.

81
New cards

Mutability

Whether a variable can be changed (mutable) or not (immutable).

82
New cards

Optional Parameters

C# allows specifying default values for parameters which make them optional when calling the method

83
New cards

Void

A return type that means this method doesn't have a return value

84
New cards

Spaghetti Codes

Program Jumps over the place and its difficult to follow

85
New cards

OOP Paradigm

Suggest that we should model Instructions in a Computer program with the data they manipulate and store these as components together

86
New cards

Procedural Programming

Sequence of Instructions to be executed.

87
New cards

Reference Datatype

Data types that contains a pointer to another memory

88
New cards

Initialization

giving a variable an initial value