Ministry of Higher Education
Khan E Noor University
Faculty of Computer Science
Visual
Programming
Spring Semester,
Gmail: Shafiqullahkhan008@gmail.com
Contact: +93776520008
Lecturer: Shafiq Ullah “Zazai”
Academic Year: 1403
Outline
• Over all information about Software
• Editors
• Basic elements of computer organization
Faculty of Computer Science - Khan E Noor University
What is Software?
A set of instructions, Which perform
specific actions.
Faculty of Computer Science - Khan E Noor University
Types of Software
• System Software
• Application Software
• Programming Software
Faculty of Computer Science - Khan E Noor University
System Software?
• Those Software, which are working within a
system and control operates whole system.
Example: Operating System (Windows)
Faculty of Computer Science - Khan E Noor University
Application Software
• Those Software, which are created for
Human’s requirements.
Example: Office Package (Word, Excel …)
Faculty of Computer Science - Khan E Noor University
Programming Software?
• Programming Languages are known as
Programming Software such as:
C++, Java, Python
Faculty of Computer Science - Khan E Noor University
OOP Vs Procedure Languages
Procedural Programming divides the program into small
programs and refers to them as functions. Object Oriented
Programming divides the program into small parts and refers to
them as objects. Available data is capable of moving freely
within the system from one function to another.
Faculty of Computer Science - Khan E Noor University
Front - end vs Back – end
The front end is what your users see and includes
visual elements like button, checkboxes, graphics
and text messages. It allows your users to interact
with your application. The backend is the data and
infrastructure that make your application work. It
stores and processes application data for your users.
Faculty of Computer Science - Khan E Noor University
Translation Process?
• Compiler
• Interpreter
• Assembler
Faculty of Computer Science - Khan E Noor University
Programming Languages
• Desktop Based
C, C++, JAVA
• WEB BASED
HTML, CSS, PHP
Faculty of Computer Science - Khan E Noor University
What is C#?
C# is pronounced "C-Sharp".
It is an object-oriented programming language created by
Microsoft that runs on the .NET Framework.
C# has roots from the C family, and the language is close
to other popular languages like C++ and Java.
The first version was released in year 2002. The latest
version, C# 12, was released in November 2023
Faculty of Computer Science - Khan E Noor University
• C# is used for:
• Mobile applications
• Desktop applications
• Web applications
• Web services
• Web sites
• Games
• VR
• Database applications
• And much, much more!
Faculty of Computer Science - Khan E Noor University
Programming Languages
The first language which can convert binary
code into executable code is C++.
Java: uses JVM for converting binary to exe
file.
C#: uses MSIL for converting binary to exe
file.
Faculty of Computer Science - Khan E Noor University
Programming Languages
.NET framework: ready codes those written
from other programmer or ready made classes
for users.
.NET uses MSIL.
Faculty of Computer Science - Khan E Noor University
Programming Languages
.NET has two main components:
CLR (Common Language Runtime)
Used to setup and use other Programming
Language in .NET.
BCR(Base Class Library) Already read made
classes from Microsoft.
Faculty of Computer Science - Khan E Noor University
Advantages of Programming
Languages
The Advantages of Programming Languages
Performance: Compiled code can result in faster
performance and more efficient use of system
resources, making programming languages well-
suited for computationally intensive tasks and large-
scale software systems.
Faculty of Computer Science - Khan E Noor University
Programming Languages
Class: a set of objects that perform some
action and ready Or
made block of code is called class.
Faculty of Computer Science - Khan E Noor University
Programming Languages
What is an object?
- Property
- Functionality
Faculty of Computer Science - Khan E Noor University
Usage of Programming Languages in
current Market
As of 2022, JavaScript and HTML/CSS were the most
commonly used programming languages among
software developers around the world, with more
than 63.6 percent of respondents stating that they
used JavaScript and just around 53 percent using
HTML/CSS.
Faculty of Computer Science - Khan E Noor University
Why Use C#?
• It is one of the most popular programming languages in the
world
• It is easy to learn and simple to use
• It has huge community support
• C# is an object-oriented language which gives a clear
structure to programs and allows code to be reused,
lowering development costs
• As C# is close to C, C++ and Java, it makes it easy for
programmers to switch to C# or vice versa
Faculty of Computer Science - Khan E Noor University
C# IDE
The easiest way to get started with C# is to use an IDE.
An IDE (Integrated Development Environment) is used to edit
and compile code.
In our tutorial, we will use Visual Studio Community, which is
free to download from
https://visualstudio.microsoft.com/vs/community/.
Applications written in C# use the .NET Framework, so it makes
sense to use Visual Studio, as the program, the framework, and
the language, are all created by Microsoft.
Faculty of Computer Science - Khan E Noor University
C# Install
Once the Visual Studio Installer is downloaded and installed, choose the .NET
workload and click on the Modify/Install button:
Faculty of Computer Science - Khan E Noor University
After the installation is complete, click on
the Launch button to get started with Visual Studio.
On the start window, choose Create a new project:
Faculty of Computer Science - Khan E Noor University
Basic Structure
Faculty of Computer Science - Khan E Noor University
C# Syntax
In the previous chapter, we created a C# file called
Program.cs, and we used the following code to print
"Hello World" to the screen:
Faculty of Computer Science - Khan E Noor University
Example explained
Line 1: using System means that we can use classes from the System namespace.
Line 2: A blank line. C# ignores white space. However, multiple lines makes the code more readable.
Line 3: namespace is used to organize your code, and it is a container for classes and other namespaces.
Line 4: The curly braces {} marks the beginning and the end of a block of code.
Line 5: class is a container for data and methods, which brings functionality to your program.
Every line of code that runs in C# must be inside a class. In our example, we named the class Program.
Faculty of Computer Science - Khan E Noor University
Discussion & Conclusion
Faculty of Computer Science - Khan E Noor University