0% found this document useful (0 votes)
38 views

Basic Programming Concepts

The document discusses basic programming concepts that developers should understand including algorithms, source code, compilers, data types, variables, conditionals, arrays, loops, functions, and classes.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

Basic Programming Concepts

The document discusses basic programming concepts that developers should understand including algorithms, source code, compilers, data types, variables, conditionals, arrays, loops, functions, and classes.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Basic Programming Concepts

Computer Programming is a set of instructions, that helps the


developer to perform certain tasks that return the desired output
for the valid inputs.

Basic Programming Concepts

Developers should have essential knowledge on the following


concepts to become skilled in Computer Programming,

#1) Algorithm: It is a set of steps or instruction statements to be


followed to accomplish specific tasks. A developer can design
his algorithm to achieve the desired output. For Example, a
recipe to cook a dessert. The algorithm describes the steps to
be followed for completing a specific task, but it does not say
how to achieve any of the steps.

#2) Source code: Source code is the actual text that is used to
construct the program using the language of choice.

For Example, it is mandatory to have the main method in Java


and the text used is as shown below.

public static void main(String arg[]) {


//Steps to be performed
}
#3) Compiler: Compiler is a software program that helps in
converting the source code into binary code or byte code, also
called machine language, that is easy for a computer to
understand, and can be further executed using an interpreter to
run the program.

#4) Data Type: Data used in the applications can be of a


different type, it can be a whole number (integer), floating-point
(decimal point numbers), characters or objects. For Example,
double currency = 45.86, where double is a data type used for
storing numbers with decimal points.

#5) Variable: Variable is a space holder for the value stored in


the memory and this value can be used in the application. For
Example, int age = 25, where age is a variable.

#6) Conditionals: Knowledge of how to use a certain condition,


such that a set of code should execute only if a certain
condition is true. In case of a false condition, the program
should exit and should not continue the code further.

#7) Array: Array is the variable that stores elements of a similar


data type. Knowledge of using an array in coding/programming
will be a great benefit.

#8) Loop: Loop is used to execute the series of code until the
condition is true. For Example, in Java, loops can be used as for
loop, do-while, while loop or enhanced for loop.

The code for loop is as shown below:

for (int I =0; i<10; i++) {System.out.println(i); }


#9) Function: Functions or methods are used to accomplish a
task in programming, a function can take parameters and
process them to get the desired output. Functions are used to
reuse them whenever required at any place repeatedly.

#10) Class: Class is like a template that contains state and


behavior, which corresponding to programming is field and
method. In Object-Oriented languages like Java, everything
revolves around Class and Object.

#Coding_and_Programming

You might also like