Overview of Programming
Concepts
Agenda
Introduction to Computer Program
Introduction to Computer Programming
Uses of Computer Programs
Algorithm
Computer Programming - Basics
Computer Programming - Environment
Introduction to Computer Program
A computer program is a sequence of instructions written using a Computer
Programming Language to perform a specified task by the computer
The two important terms that we have used in the above definition are
Sequence of instructions
Computer Programming Language
Human Language to tell the way to go to KFC, something as follows. (Human
Program written in English Language)
Go straight
Drive half kilometer
Take left
Drive around one kilometer
Search for KFC at your right side
Introduction to Computer Program
A computer program is also called a computer software, which can range from two
lines to millions of lines of instructions.
Computer program instructions are also called program source code and computer
programming is also called program coding.
A computer without a computer program is just a dump box; it is programs that
make computers active.
Introduction to Computer Programming
As we have developed so many languages to communicate among ourselves,
computer scientists have developed several computer-programming languages to
provide instructions to the computer (i.e., to write computer programs).
The act of writing computer programs is called computer programming.
Most Popular Programming Languages:
Java
C
C++
Python
PHP
Perl
Rub
Uses of Computer Programs
Today computer programs are being used in almost every field, household, agriculture,
medical, entertainment, defense, communication, etc.
Listed below are a few applications of computer programs −.
MS Word, MS Excel, Adobe Photoshop, Internet Explorer, Chrome, etc., are examples of computer
programs.
Computer programs are being used to develop graphics and special effects in movie making.
Computer programs are being used to perform Ultrasounds, X-Rays, and other medical
examinations.
Computer programs are being used in our mobile phones for SMS, Chat, and voice communication.
Someone who can write computer programs or in other words, someone who can do
computer programming is called a Computer Programmer
Algorithm
An algorithm is a step-by-step procedure to resolve any problem.
An algorithm is an effective method expressed as a finite set of well-defined instructions.
A computer programmer lists down all the steps required to resolve a problem before
writing the actual code.
simple example of an algorithm to find out the largest number from a given list of numbers
Get a list of numbers L1, L2, L3....LN
Assume L1 is the largest, Largest = L1
Take next number Li from the list and do the following
If Largest is less than Li
Largest = Li
If Li is last number from the list then
Print value stored in Largest and come out
Else repeat same process starting from step 3
Computer Programming - Basics
Human Interface Languages (Hindi, English, Spanish, French, etc.) are made of several elements
like verbs, nouns, adjectives, adverbs, propositions, and conjunctions, etc.
Similar to Human Interface Languages, Computer Programming Languages are also made of
several elements.
These basic elements include
Programming Environment
Basic Syntax
Data Types
Variables
Keywords
Basic Operators
Decision Making
Loops
Numbers
Characters
Arrays
Strings
Functions
File I/O
Computer Programming - Environment
Java SE is freely available from the link Download Java. You can download a version based
on your operating system.
Follow the instructions to download Java and run the .exe to install Java on your machine.
Set environment variables to point to correct installation directories.
Setting Up the Path for Windows
Assuming you have installed Java in c:\Program Files\java\jdk directory
Right-click on 'My Computer' and select 'Properties'.
Click the 'Environment variables' button under the 'Advanced' tab.
Now, alter the 'Path' variable so that it also contains the path to the Java executable. Example, if the
path is currently set to 'C:\WINDOWS\SYSTEM32', then change your path to read 'C:\
WINDOWS\SYSTEM32;c:\Program Files\java\jdk\bin'.
Computer Programming - Environment
Popular Java Editors
Notepad − On Windows machine, you can use any simple text editor like Notepad ,TextPad.
Netbeans − A Java IDE that is open-source and free which can be downloaded from
https://www.netbeans.org/index.html.
Eclipse − A Java IDE developed by the eclipse open-source community and can be downloaded
from https://www.eclipse.org/