General Coding

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

1/5

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.

6 Terms

1
New cards

Encapsulation in coding refers to the bundling of data (attributes or variables) together with the methods (functions) that operate on that data, typically within a class or object. This concept is fundamental to object-oriented programming (OOP) but can also apply to other programming paradigms.

A key aspect of encapsulation is restricting direct access to some of an object's components. This means that internal data or state is kept private or protected, and can only be accessed or modified through well-defined public methods (often called getters and setters). By doing so, encapsulation:

  • Hides the internal implementation details of a class from external code.

  • Ensures that the object's state remains valid and is not inadvertently corrupted by outside interference.

  • Promotes modularity, code organization, and reusability by keeping related data and behavior together.

  • Reduces coupling, making it easier to change or refactor code without impacting other parts of the program.

In summary, encapsulation is the practice of combining data and the methods that manipulate that data into a single unit, while controlling access to the internal state to protect integrity and hide complexity from the outside world

What is encapsulation?

2
New cards

Inheritance in coding, specifically in object-oriented programming, is a mechanism that allows a class (called a subclass or child class) to acquire the properties and behaviors (attributes and methods) of another class (called a superclass, parent class, or base class). This enables code reuse, as the subclass inherits functionality from the parent class and can also extend or override it to provide specialized behavior. Inheritance helps organize code in a hierarchy from general to specific, representing "is-a" relationships—such as a Student or Instructor class inheriting from a more general Person class

What is inheritance?

3
New cards

Object-oriented programming (OOP) is a programming paradigm that organizes software design around objects rather than functions and logic. In OOP, objects are data structures that combine both data (attributes or properties) and behaviors (methods or functions) within a single unit

. These objects interact with each other to model real-world systems or abstract concepts.

Key features of OOP include:

  • Classes and Objects: A class is a blueprint for creating objects, defining their attributes and behaviors. Objects are specific instances of classes

  • .

  • Encapsulation: Bundling data and methods together, and restricting direct access to some components of an object.

  • Inheritance: Allowing new classes to acquire properties and behaviors from existing classes, promoting code reuse.

  • Polymorphism: Enabling objects to be treated as instances of their parent class, allowing different behaviors to be implemented in derived classes.

  • Abstraction: Hiding complex implementation details and exposing only the necessary features.

OOP is widely used in languages such as Java, C++, Python, and C#, and is especially effective for building large, complex, and maintainable software systems.

What is object oriented programming?

4
New cards

• Classes provide additional functionality over structures.

• Classes continue the concept of encapsulation and provide,

additionally, inheritance and polymorphism.

• You will typically create your class definitions in a separate

source file, and will place the class definition within the same

namespace as your main project.

• Classes share some similarity with structures.

• A significant difference is that an instance of a structure is a

value type, while an instance of a class is a reference type.

• The new keyword is used to create an instance (an object)

based on the class.

What are the characteristics of classes?

5
New cards

Edge Computing Concepts

Definition and Core Idea

Edge computing is a distributed computing framework that processes and stores data closer to where it is generated—at the "edge" of the network, near users and devices, rather than relying solely on centralized data centers or cloud infrastructure. This proximity allows for faster data processing, reduced latency, and improved bandwidth efficiency.

Key Concepts

  • Proximity to Data Source: Data is processed near its point of origin (such as IoT devices, sensors, or local servers), enabling real-time analysis and response.

  • Distributed Architecture: Unlike traditional centralized models, edge computing distributes computing resources across multiple locations, often at or near the physical location of users or devices.

  • Latency Reduction: By minimizing the distance data must travel, edge computing significantly reduces response times—critical for applications like autonomous vehicles, industrial automation, and augmented reality.

  • Bandwidth Optimization: Only essential or summarized data is sent to the central cloud or data center, reducing network congestion and transmission costs.

  • Edge Devices: These are physical hardware components (e.g., IoT gateways, smart sensors, industrial controllers, point-of-sale terminals, drones) capable of local data processing and sometimes storage.

  • Hybrid and Complementary Models: Edge computing often complements cloud computing, forming hybrid models where some tasks are handled locally and others centrally

Applications and Use Cases

  • Internet of Things (IoT): Smart sensors and devices in manufacturing, healthcare, and smart cities process data locally for immediate action.

  • Autonomous Vehicles: Vehicles process sensor data in real time for navigation and safety.

  • Content Delivery Networks (CDNs): Media and gaming companies cache and deliver content from edge servers close to users for faster access.

  • Industrial Automation: Factories use edge computing for real-time monitoring and control of machinery.

Benefits

  • Faster insights and response times

  • Improved user experiences

  • Reduced network congestion and bandwidth costs

  • Enhanced privacy and security by limiting data transmission

https://www.perplexity.ai/search/what-are-edge-computing-concep-bdqyh1PEQDePrb4qO3c1BQ

What are edge computing concepts

6
New cards

Propagate out

The term that refers to the process of an exception moving up the call stack when it is not caught or handled within a function. This means that if an exception occurs in a function and there is no except block to handle it, the exception will be passed to the calling function, and this process continues until the exception is either caught and handled or reaches the top level of the program, at which point it may terminate the program if unhandled