0% found this document useful (0 votes)
3 views10 pages

Adet Reviewer

C# is a versatile, object-oriented programming language developed by Microsoft, designed for cross-platform application development, including web, mobile, and game development. It emphasizes safety and efficiency with features like strong typing and automatic memory management, and is regularly updated to enhance its capabilities. The document also covers C# program structure, object-oriented programming principles, Agile methodologies, Scrum framework, and version control systems like Git.

Uploaded by

evansyennefer
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)
3 views10 pages

Adet Reviewer

C# is a versatile, object-oriented programming language developed by Microsoft, designed for cross-platform application development, including web, mobile, and game development. It emphasizes safety and efficiency with features like strong typing and automatic memory management, and is regularly updated to enhance its capabilities. The document also covers C# program structure, object-oriented programming principles, Agile methodologies, Scrum framework, and version control systems like Git.

Uploaded by

evansyennefer
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/ 10

MODULE 1 C# is Cross-Platform

What is C#? • Can be used to develop .NET


applications that work on multiple
C# is a strongly typed, object-oriented operating systems.
programming language. It is open source,
simple, modern, flexible, and versatile. • Applications can be deployed to
cloud environments.
C# was developed and launched by
Microsoft in 2001 as part of the .NET C# is Safe and Efficient
framework. It provides modern and
• Does not allow direct memory
developer-friendly features that allow for
manipulation, reducing security
robust and efficient application
risks.
development. It is widely used for building
desktop applications, web applications, • Automatic memory management via
cloud services, game development (using garbage collection.
Unity), and enterprise solutions.
C# is Versatile
Characteristics of C#:
• Used in various domains: web
1. Modern and easy - Designed to be development, mobile apps, AI, game
simple and developer-friendly. development, APIs.
2. Fast and open-source - C# runs • Works with .NET Core and .NET
efficiently and is freely available. Framework.
3. Cross-platform - Works on Windows, C# is Evolving
Linux, and MacOS.
• Regularly updated with new features
4. Safe - Strong type checking and like async programming, pattern
memory management. matching, and improved
performance optimizations.
5. Versatile - Used for mobile apps,
game development, cloud
applications, and more.
6. Evolving - Regular updates to
improve performance and
capabilities.
C# is Modern and Easy
• Encapsulation, exception handling,
and garbage collection make C# a
reliable language.
• Strong typing prevents common
errors.
• Rich standard library simplifies
development.
MODULE 2 • Reference types (stored in heap
memory):
C# Program Structure
o string (sequence of
A simple C# program consists of:
characters)
• Namespace Declaration –
o Arrays (int[] numbers = new
Organizes code and avoids name int[5];)
conflicts.
• Class Declaration – Defines a o Objects (instances of a class)
blueprint for objects.
o dynamic (runtime-defined
• Methods – Blocks of code that
types)
perform actions.
• Main Method (Main ()) – The entry • Nullable types (int? x = null; allows
point of a C# program. null values for value types)
• Statements & Expressions –
Instructions executed by the C# Operators
compiler. Operators in C# allow performing different
• Comments – Used for operations on variables:
documentation (// single-line and /*
multi-line */). • Arithmetic operators: +, -, *, /, %

Data Types in C# • Comparison operators: ==, !=, >,


<, >=, <=
C# supports multiple data types,
categorized into value types and reference • Logical operators: &&, ||, !
types:
• Bitwise operators: &, |, ^, <<, >>
• Value types (stored in stack
• Assignment operators: =, +=, -=,
memory):
*=, /=
o Integer types: int, long, short,
byte
Control Flow in C#
o Floating-point types: float,
double, decimal Control structures in C# determine the
execution flow of the program:
o Boolean type: bool
• If-Else Statements: if (condition) { /*
o Character type: char
code */ } else { /* code */ }
o String
• Switch Statements: switch (value) {
EXAMPLE: case 1: ... break; }

int age = 25; • Loops:

double price = 99.99; o for (predefined iterations)

char grade = 'A'; o while (condition-based loop)

bool isPassed = true; o do-while (executes at least


once)
string name = "John";
o foreach (loops through 2. Inheritance: One class can inherit
collections) from another.
Arrays in C# Inheritance allows a class to reuse
code from another class.
Arrays store multiple values in a single
variable: 3. Polymorphism: Methods can take
multiple forms (overloading,
• Single-dimensional array: int[] overriding).
numbers = new int[5];
• Multi-dimensional array: int[,] Polymorphism allows methods to
matrix = new int[3,3]; take multiple forms, meaning that
the same method name can behave
• Jagged array: int[][] jagged = new differently in different classes.
int[3][];

Types of Polymorphism:
MODULE 3: OBJECT-ORIENTED 1. Method Overriding (Runtime
PROGRAMMING (OOP) IN C# Polymorphism) – A subclass
4 Pillars of OOP provides a new implementation of a
method from its parent class.
1. Encapsulation: Restricts direct
access to object data. EXAMPLE:
class Animal
Encapsulation is implemented
{
using private fields and public
public virtual void MakeSound()
properties.
{
EXAMPLE: Console.WriteLine("Animal
makes a sound");
class Person
}
{ }

private string name; // Private field class Cat : Animal


{
public override void MakeSound()
public string Name // Public {
property Console.WriteLine("Cat
meows");
{
}
get { return name; } }

set { name = value; }


}
}
2. Method Overloading (Compile- • Interface – Defines a contract that
time Polymorphism) – Multiple classes must follow.
methods with the same name but
EXAMPLE:
different parameters exist in a class.
interface IAnimal
EXAMPLE:
class MathOperations {
{ void MakeSound();
public int Add(int a, int b)
{ }
return a + b;
class Dog : IAnimal
}
{
public double Add(double a,
double b) public void MakeSound()
{ {
return a + b;
} Console.WriteLine("Dog
} barks.");

4. Abstraction: Hides implementation }


details from users.
}
Implemented using Abstract Classes or
Interfaces
Access Modifiers in C#
• Abstract Class – A class that
cannot be instantiated and must • Public: Accessible anywhere.
be inherited.
• Private: Restricted to the same
EXAMPLE: class.
abstract class Vehicle • Protected: Accessible in the class
and derived classes.
{
• Internal: Accessible within the same
public abstract void Move();
assembly.
}
Constructors and Destructors
class Car : Vehicle
• Constructor: Initializes an object.
{
EXAMPLE:
public override void Move()
class Person
{
{
Console.WriteLine("Car is
public string Name;
moving.");
}}
public Person(string name)
{ 5. D - Dependency Inversion
Principle (DIP)
Name = name;
o Depend on abstractions, not
}
concrete classes.
}

AGILE & SCRUM TRAINING


• Destructor: Cleans up resources.
What is Agile?
Interfaces vs. Abstract Classes –
• Agile is an iterative and incremental
• Interfaces define what a class must approach to software development.
do, but not how.
• Focuses on:
• Abstract classes define some
behavior but leave details for o Customer collaboration
subclasses.
o Continuous feedback
o Responding to change
SOLID PRINCIPLES
o Delivering small, working
SOLID is a set of five design principles for
pieces of software frequently
writing maintainable and scalable code.
Agile Principles
1. S - Single Responsibility Principle
(SRP) Agile is guided by 12 principles, including:
o A class should only have one • Satisfy the customer through early
reason to change. and continuous delivery
2. O - Open-Closed Principle (OCP) • Welcome changing requirements
o Classes should be open for • Deliver working software frequently
extension but closed for (weeks rather than months)
modification.
• Close, daily cooperation between
3. L - Liskov Substitution Principle business people and developers
(LSP)
• Projects are built around motivated
o Subtypes must be individuals
replaceable for their base
types without affecting • Face-to-face conversation is the
functionality. best form of communication

4. I - Interface Segregation Principle • Working software is the primary


(ISP) measure of progress

o No client class should be • Sustainable development pace


forced to implement • Continuous attention to technical
unnecessary unused excellence
methods.
• Simplicity—the art of maximizing the o Cross-functional group who
amount of work not done do the actual work (design,
code, test)
• Self-organizing teams
• Regular reflection and adjustment
Scrum Events (Ceremonies)
Agile Manifesto Values
1. Sprint
• Individuals and interactions over
processes and tools o Time-boxed development
cycle (commonly 2–4 weeks)
• Working software over
comprehensive documentation o Produces a potentially
shippable product increment
• Customer collaboration over
contract negotiation 2. Sprint Planning
• Responding to change over o Define what can be delivered
following a plan in the sprint
o Create the Sprint Backlog
What is Scrum? 3. Daily Scrum (Stand-up)
• Scrum is an Agile framework that o 15-minute time-boxed
helps teams work together. meeting
• Encourages learning through o Team members share:
experiences, self-organization, and
reflection. ▪ What they did
yesterday
Scrum Roles
▪ What they’ll do today
1. Product Owner
▪ Any blockers
o Owns the product backlog
4. Sprint Review
o Prioritizes and defines
o Held at the end of the Sprint
features
o Demonstrate what was
o Acts as a liaison between
accomplished
stakeholders and the team
2. Scrum Master o Get feedback from
stakeholders
o Coaches the team on Scrum
5. Sprint Retrospective
practices
o Reflect on the sprint
o Facilitates meetings
o Removes obstacles o Identify what went well, what
to improve
3. Development Team
Scrum Artifacts
1. Product Backlog BONUS TERMS TO REMEMBER
o Ordered list of all desired • Time-boxing: Setting fixed time
work periods for activities.
o Maintained by Product • Definition of Done: A shared
Owner understanding of when work is
complete.
2. Sprint Backlog
• Velocity: The amount of work a
o List of tasks selected for the team can complete in a sprint.
current sprint
• Burndown Chart: Visual tool to
3. Increment
track remaining work in a sprint.
o Sum of all completed product
backlog items during a sprint
INTRODUCTION TO VERSION CONTROL
SYSTEM
User Stories
What is a Version Control System (VCS)?
• Definition: Short descriptions of a
A Version Control System is a software tool
feature from the user's perspective
that helps developers manage changes to
• Format: source code over time. It keeps a record of
“As a [user], I want [goal] so that every modification, who made it, when, and
[benefit]” why. VCS is essential in collaborative
environments where multiple developers
• Example: work on the same codebase.
“As a user, I want to reset my
password so that I can access my Key Functions of a VCS:
account if I forget it.”
• Tracking Changes: Maintains a
history of code updates.

Key Benefits of Agile & Scrum • Collaboration: Allows multiple


developers to work on a project
• Faster delivery of functional software simultaneously.
• Better ability to handle changing • Reverting to Previous Versions: If
priorities a mistake is made, it's easy to return
• Increased team collaboration to a working version.

• Continuous customer feedback and • Branching and Merging:


satisfaction Developers can create independent
branches and merge them later.
• Higher product quality
• Conflict Resolution: Helps manage
• Increased transparency and visibility and resolve code conflicts.
• Predictable project timelines and
costs
Types of Version Control Systems: Basic Git Terminology:
1. Local VCS • Repository (repo): A directory or
storage space for your project.
• Stores versions on the developer’s
local machine. • Commit: A saved change or
snapshot of the project.
• Simple and fast but limited
collaboration capabilities. • Branch: A separate line of
development.
• Example: Revision Control System
(RCS) • Merge: Combine changes from one
branch into another.
2. Centralized VCS (CVCS)
• Clone: Create a local copy of a
• Single central server stores all remote repository.
versions.
• Remote: A version of the repository
• Clients access the central server to
hosted on the internet or network.
update or retrieve code.
Common Git Commands:
• Pros: Simple, well-organized history
• Cons: Single point of failure (if Command Description
git init Initializes a new Git repository.
server goes down, access is lost) Clones a repository into a new
git clone [URL]
directory.
• Examples: Subversion (SVN), Shows the current state of the working
git status
Perforce directory and staging area.
Stages specific file(s) for the next
git add [file]
commit.
3. Distributed VCS (DVCS) Stages all changes in the current
git adds.
directory.
• Every developer has a full copy of Commits staged changes with a
git commit -m "message"
the repository, including history. descriptive message.
Shows a list of all commits made in the
git log
current branch.
• Offline access and enhanced Displays a summarized one-line-per-
git log --oneline
collaboration. commit view.
git branch Lists all branches in the repo.
• Highly resilient; changes can be git branch [name] Creates a new branch.
git checkout [name] Switches to an existing branch.
pushed and pulled across git checkout -b [name] Creates and switches to a new branch.
repositories. git merge [branch]
Merges another branch into the current
branch.
• Example: Git, Mercurial git diff Shows the differences between files.
git reset [file] Unstages a file from the staging area.
Resets the working directory and
git reset --hard
staging area to match the last commit.
Temporarily saves changes without
What is Git? git stash
committing them.
Applies the latest stashed changes and
git stash pop
Git is a free and open-source distributed removes them from the stash.
Lists the remote repositories connected
version control system created by Linus git remote -v
to your local repo.
Torvalds in 2005. It is designed to handle git push origin [branch]
Pushes changes of the specified branch
to the remote.
projects efficiently and reliably, regardless of Fetches and merges changes from the
git pull origin [branch]
size. remote branch.
Downloads objects and refs from
git fetch
another repository but doesn't merge.
Reapplies commits on top of another
git rebase [branch]
base tip. Used for a cleaner history.
Popular Platforms for Version Control: • It’s independent of the user
interface.
• GitHub – Cloud-based hosting for
Git repositories, ideal for open- • Often connected to databases or
source and collaboration. external services.
• GitLab – Git-based DevOps Responsibilities:
platform with CI/CD integration.
• Interacting with the database
• Bitbucket – Git repository hosting
• Performing calculations
by Atlassian.
• Business rule enforcement
Best Practices:
Example: A User class that validates login
• Commit often with meaningful
credentials.
messages.
• Use branches for features, bug fixes,
or experiments. 2. View
• Pull updates regularly to avoid • Represents the presentation layer
conflicts. or User Interface (UI).
• Do code reviews through Pull • Displays the data provided by the
Requests (PRs). Model.
• Avoid committing sensitive • Receives data from the Controller to
information (like passwords or keys). render it.
MODEL-VIEW-CONTROLLER (MVC) Responsibilities:
ARCHITECTURE
• Show data in a readable format
What is MVC? (tables, charts, forms)
MVC is a software architectural pattern • Accept user inputs through forms or
that separates an application into three fields
main components: Model, View, and
Controller. This separation helps manage Example: HTML/CSS/JavaScript front-end
complex applications by promoting rendering user profiles
organized and reusable code.

3. Controller
Components of MVC: • Acts as the middleman between
1. Model Model and View.

• Represents the data and the • Takes user input, processes it, and
business logic. interacts with the Model.

• Retrieves, stores, and processes • Sends processed data to the View


information. for presentation.
Responsibilities: • Angular (MVC-inspired structure in
JS)
• Handling HTTP requests (in web
apps) • Spring MVC (Java)
• Updating Models and Views
• Routing (deciding what happens for
each URL)
Example: A login controller checking user
credentials and directing the user to the
dashboard.
How MVC Works:
1. User interacts with the View (e.g.,
clicks a button).
2. The Controller processes the input.
3. The Model updates based on the
input.
4. The View reflects the updated data.
Advantages of MVC:
• Separation of Concerns: Each
component has its own
responsibilities.
• Reusability: Components can be
reused independently.
• Scalability: Easier to manage large
applications.
• Testability: Easier to test each part
individually.
• Parallel Development: Frontend
and backend can work
independently.
Real-World Examples of MVC
Frameworks:
• ASP.NET MVC (C#)
• Ruby on Rails (Ruby)
• Django (Python)
• Laravel (PHP)

You might also like