0% found this document useful (0 votes)
14 views7 pages

AD Prep

The document discusses key object-oriented programming principles including encapsulation, inheritance, abstraction, and polymorphism, along with their benefits and examples in C#. It also covers the .NET Framework, its components like CLR and ASP.NET, and the advantages of using web application frameworks. Additionally, it outlines various types of software testing, including unit, acceptance, smoke, integration, and regression testing.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views7 pages

AD Prep

The document discusses key object-oriented programming principles including encapsulation, inheritance, abstraction, and polymorphism, along with their benefits and examples in C#. It also covers the .NET Framework, its components like CLR and ASP.NET, and the advantages of using web application frameworks. Additionally, it outlines various types of software testing, including unit, acceptance, smoke, integration, and regression testing.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Encapsulation

Encapsulation is an object-oriented programming principle that restricts direct access to an


object's data and functions, ensuring better modularity and security.

Example in C#:

Benefits:

• Protects internal state from unintended modifications

• Enhances code maintainability and scalability

• Encourages modular programming


Inheritance and types of inheritance

Inheritance allows a class to derive properties and behaviors from another class.

Types of inheritance:

1. Single Inheritance – A class inherits from a single parent class.

2. Multi-level Inheritance – A class inherits from another class, which in turn inherits from
another class.

3. Multiple Inheritance (via interfaces) – A class can inherit multiple interfaces in C#.

4. Hierarchical Inheritance – Multiple classes inherit from a single parent class.

Example of Single Inheritance in C#:


Concept of Abstraction

Abstraction hides implementation details and exposes only necessary functionalities

Example of Abstraction in C#:


Polymorphism in C#

Polymorphism concept in programming that lets us use the same method name but with
different behaviors, either by changing its parameters or modifying its functionality in child
classes.

Types of Polymorphism:

1. Compile-time Polymorphism (Method Overloading) – Multiple methods with the same


name but different parameters.

2. Run-time Polymorphism (Method Overriding) – A derived class overrides a method from


the base class.

Example of Method Overloading in C#:


Example of Method Overriding in C#:
.NET Framework

.NET Framework is a Microsoft software framework that provides a runtime environment for
developing applications across various platforms.

Key Components:

• Common Language Runtime (CLR) – Manages code execution, provides memory


management, and ensures security enforcement.

• Base Class Library (BCL) – Offers built-in functions for common tasks such as file
handling, data manipulation, and networking
• ASP.NET – A framework for building dynamic web applications and services.
• Windows Forms – Provides tools for developing desktop applications with graphical
user interfaces.
• MSIL (Microsoft Intermediate Language) – A low-level programming language used by
the .NET compiler before code is executed by the CLR.

Virtual Environment (CLR) in .NET Framework

Common Language Runtime (CLR) in the .NET Framework is a virtual execution environment
responsible for managing code execution and providing services such as memory management,
and exception handling.

• Code Execution Management – The CLR converts compiled code (Intermediate


Language - IL) into native machine code via the Just-In-Time (JIT) compiler, optimizing
execution.
• Automatic Memory Management – It includes Garbage Collection (GC) to
automatically reclaim unused memory, preventing memory leaks.
• Multi-language Interoperability – Since .NET supports multiple programming
languages (C#, VB.NET, F#), the CLR allows seamless interaction between them.
• Thread Management – Enables efficient execution of concurrent operations through
built-in threading support.

Benefits of web application frameworks like ASP.NET

Rapid Development – Built-in tools, libraries, and components help developers create
applications quickly without having to build everything from scratch.

Security Features – ASP.NET includes authentication, authorization, and data


protection mechanisms, reducing vulnerabilities and helping safeguard applications.

Scalability – The framework supports scalable architecture, making it easy to handle


high traffic and complex applications.

Performance Optimization – ASP.NET offers efficient memory management and


caching mechanisms to enhance application performance.

Cross-Platform Compatibility – With .NET Core, ASP.NET applications can run on


Windows, Linux, and macOS, offering flexibility in deployment
Types of Testing

1. Unit Testing – This involves testing individual components or functions of a software


application in isolation. Developers typically write unit tests to verify that specific pieces
of code work correctly.

2. Acceptance Testing – This ensures that the software meets business requirements and
satisfies user needs. It’s often conducted by clients or end users to confirm the
software’s functionality before deployment.

3. Smoke Testing – A preliminary test that checks whether the core functionalities of an
application are working. If the smoke test fails, further testing is halted until the major
issues are resolved.

4. Integration Testing – This verifies that different modules or components of an


application work together as expected. It ensures seamless interaction between
integrated parts.

5. Regression Testing – Conducted after updates or modifications to the software,


regression testing ensures that new changes don’t break existing functionality. It’s
crucial for maintaining software stability over time.

You might also like