Comprog 2 Prelim

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/144

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.

145 Terms

1
New cards

Object-oriented Programming (OOP)

Programming paradigm using objects to represent real-world entities.

2
New cards

Procedural Programming

Programming style executing operations in a sequential manner.

3
New cards

Functional Programming

Programming style focusing on declarations and expressions.

4
New cards

Programming Paradigm

Approach to structuring and organizing code.

5
New cards

Classes

Blueprints for creating objects in OOP.

6
New cards

Objects

Instances of classes representing real-world entities.

7
New cards

Methods

Functions defined within a class in OOP.

8
New cards

Procedures

Named blocks of code in procedural programming.

9
New cards

Instance Variables

Variables specific to an object in OOP.

10
New cards

Message Passing

Method of invoking methods on objects.

11
New cards

Top-down Approach

Design method starting from high-level overview.

12
New cards

Bottom-up Approach

Design method starting from detailed components.

13
New cards

Data Security

Protection of data from unauthorized access.

14
New cards

Code Reusability

Using existing code in new applications.

15
New cards

Code Duplication

Repetition of code across different parts of a program.

16
New cards

First-class Citizens

Entities that can be assigned and passed like variables.

17
New cards

Flow-control Statements

Commands that control the flow of execution.

18
New cards

Variables

Named memory locations holding data.

19
New cards

User-defined Data Types

Custom data types defined by the programmer.

20
New cards

Functions

Reusable code blocks performing specific tasks.

21
New cards

Erlang

Programming language supporting functional programming paradigm.

22
New cards

Java

Programming language supporting OOP paradigm.

23
New cards

BASIC

Early programming language supporting procedural programming.

24
New cards

Modularized Programs

Programs organized into separate, manageable units.

25
New cards

Data Security

Encapsulation protects data from non-member functions.

26
New cards

Reduced Complexity

Inheritance simplifies program development process.

27
New cards

Reduced Time

OOP code is easier to create and implement.

28
New cards

Class

User-defined data type grouping similar objects.

29
New cards

Object

Concrete instance of a class with characteristics.

30
New cards

Method

Code block in a class performing actions.

31
New cards

Attribute

Characteristics defining an object's properties.

32
New cards

Data Abstraction

Essential details only, ignoring background information.

33
New cards

Data Encapsulation

Wrapping data and functions within a class.

34
New cards

Inheritance

Creating new classes from existing class attributes.

35
New cards

Base Class

Class providing attributes to derived classes.

36
New cards

Derived Class

Class inheriting properties from a base class.

37
New cards

Polymorphism

Same symbol interpreted differently based on context.

38
New cards

Function Members

Operations defined in a class for objects.

39
New cards

Data Members

Features or attributes of an object.

40
New cards

Automobile Example

Class with attributes like make and model.

41
New cards

Dog Example

Class with attributes like breed and age.

42
New cards

Noun Comparison

Objects are similar to nouns in programming.

43
New cards

Verb Comparison

Methods are similar to verbs in programming.

44
New cards

Encapsulation Purpose

Insulates data from outside access.

45
New cards

Abstracted Data

Hidden internal workings of an entity.

46
New cards

Operator Overloading

Same operator behaves differently based on context.

47
New cards

Function Overloading

Multiple functions with the same name, different parameters.

48
New cards

Operator Loading

Enables operators to perform different tasks based on context.

49
New cards

String Concatenation

Combines two strings into one using + operator.

50
New cards

Function Overloading

Multiple functions share the same name but differ in parameters.

51
New cards

Method

A program module executing a series of statements.

52
New cards

main() Method

Automatically executed method when a program runs.

53
New cards

Calling Method

Method that invokes another method.

54
New cards

Method Header

Defines how methods can be interacted with.

55
New cards

Access Modifier

Specifies visibility of classes and methods.

56
New cards

public Modifier

Allows access from any other class.

57
New cards

static Modifier

Allows method access without object instantiation.

58
New cards

void Return Type

Indicates method returns no data.

59
New cards

Method Name

Identifier for a method, usually a verb.

60
New cards

Parentheses in Method

Contain parameters sent to the method.

61
New cards

Method Body

Contains statements that perform the method's task.

62
New cards

Implementation

The actual code within a method body.

63
New cards

displayHours() Method

Method to display business hours of a company.

64
New cards

Curly Braces

Enclose the body of a method.

65
New cards

Arguments

Data passed to methods within parentheses.

66
New cards

Return Type

Describes data type sent back by a method.

67
New cards

Legal Identifier

Valid name for classes and variables in Java.

68
New cards

Method Invocation

The act of calling a method to execute.

69
New cards

Method Declaration

Specifies method's name, return type, and parameters.

70
New cards

CompanyInfo

Example class demonstrating method execution order.

71
New cards

main() method

Entry point for Java applications, always executed first.

72
New cards

displayHours()

Method displaying business hours for the company.

73
New cards

fully qualified identifier

Complete name including class and method name.

74
New cards

method call

Invocation of a method to execute its code.

75
New cards

method reusability

Ability to use methods across different applications.

76
New cards

class header

Defines class with access specifier, keyword, and name.

77
New cards

data fields

Variables declared within a class but outside methods.

78
New cards

private access specifier

Restricts access to class members from outside classes.

79
New cards

information hiding

Encapsulation principle limiting access to class data.

80
New cards

accessor methods

Methods that retrieve values from class fields.

81
New cards

getEmpNum()

Accessor method returning employee number.

82
New cards

static data field

Shared value across all instances of a class.

83
New cards

non-static data field

Unique value for each instance of a class.

84
New cards

method execution order

Sequence in which methods are called in a program.

85
New cards

OOP

Object-oriented programming, focusing on classes and objects.

86
New cards

class body

Contains data fields and methods, enclosed in braces.

87
New cards

println()

Method used to print output to the console.

88
New cards

object instantiation

Creating an instance of a class.

89
New cards

curly braces

Used to define the scope of classes and methods.

90
New cards

class types

Categories of classes based on object instantiation.

91
New cards

program structure

Organization of code into classes and methods.

92
New cards

Public Access Modifier

Allows methods to be accessible from outside the class.

93
New cards

getEmpNum() Method

Returns the employee number as an integer.

94
New cards

setEmpNum() Method

Sets the employee number using an integer parameter.

95
New cards

Mutator Method

Method that modifies an object's field values.

96
New cards

Constructor

Special method for creating and initializing objects.

97
New cards

Reference Type

Type that refers to an object in memory.

98
New cards

Primitive Type

Basic data types like int and char.

99
New cards

Memory Allocation

Reserving space in memory for an object.

100
New cards

Instantiation

Creating an instance of a class.