IT applications are all about managing information using a technology.

Create, Read, Update and Delete information are some of the main
operations in all IT applications. Login, Search, Validations etc are some
common functionalities in all IT applications. or e!ample
http"$let is a %eb application and you can chec& all
operations and functionalities in this %ebsite. Three Tier 'rchitecture is the
common architecture used in modern IT applications. (resentation, )usiness
Logic and Database %ill be in three di*erent physical entities.
Di*erent types of 'pplications
Des&top 'pplication + is a computer soft%are designed to help the user to
perform speci,c tas&s. -g" VLC .edia (layer, .icrosoft /0ce.
1eb 'pplication 2 is an application that is accessed o$er a net%or& such as
the Internet or an Intranet. -g" %%%.', %%%.faceboo&.com.
.obile 'pplication 2 .obile application soft%are is de$eloped for small lo%2
po%er handheld de$ices such as personal digital assistants, enterprise digital
assistants or mobile phones. -g" 1eather orcast, 4e%s Reader, 5ames,
1hatsapp etc.
problem sol$ing "
1hat is a problem66
' problem is a di0culty or a challenge, or situation that needs a solution.
-g" Dri$ing a car, .a&ing Tea, Sol$ing a cross%ord pu33le
Sample problem scenario
1e can discuss a problem scenario faced by Rail%ay department.
's part of ser$ice and de$elopment in nation lots of trains %ere added to the
Rail%ay department. 's a result the passenger ser$ices also increased.
Rail%ay stations increased. La&hs of passengers and customers started
a$ailing $arious ser$ices li&e regular tic&et boo&ings, reser$ation of tic&ets,
tic&et cancellations, en7uires etc. Ser$ices for passengers and customers at
rail%ay stations resulted in long 7ueues. This created unhappy passengers
and customers. Rail%ay employees %ere also o$erburdened %ith paper and
manual %or&. Dissatis,ed customers and o$erburdened employees %as the
end result of de$elopment.
Rail%ay %ants to impro$e sta&e holder satisfaction. This %as the problem
scenario faced by Rail%ay department. This problem can be sol$ed in 8 %ays
+ manually or automated.
Rail%ay department hired ne% sta* and increased the number of customer
ser$ice counters. (assenger count and train ser$ices are steadily increasing,
so this solution is not going to %or& for a long term. .anual errors are also
creeping up during calculations, leading to customer dissatisfaction, and
%astage of time to correct errors.
.anagement is no% thin&ing %hy not automate the entire system.
Tic&et boo&ing and seat a$ailability trac&ing
(assenger data management
Regular tic&eting and so on9
They decided to come up %ith a computeri3ed system that handles $arious
day to day acti$ities at their o0ce.
Computer (rograms
Computer is a machine. It needs to be instructed ho% to perform a tas&, ho%
to handle data, %here to store it and so on.
(rograms + Set of instructions that is carried out by the computer
Soft%are + Collection of computer programs and data that tells computer
%hat to do
In a computer based solution, business re7uirement of a user, ultimately get
translated to lines of code that instructs computer to %or& in such a %ay as to
meet the re7uirement
:o% to sol$e a problem
1hene$er a problem occurs, people tend to concentrate too much on the
solution and sometimes forget the essence of the problem. It is essential for
the indi$idual to ha$e a right approach to the problem itself in order to ,gure
out the best solution.
(eople %ho are really good at sol$ing problems go about it systematically.
They ha$e a %ay of placing the problem in conte!t and do not ;ump to
conclusions. They e$aluate all alternati$es.
Steps in (roblem Sol$ing
Step < 2 'naly3ing the problem
This in$ol$es understanding the input and output, $arious alternati$es to
reach the output, listing the assumptions
Step 8 2 Designing an algorithm
De,ning a step by step procedure to sol$e the problem
Step = 2 Testing the design for correctness
Chec&ing for the correctness of algorithm by %al&ing through the algorithm
Step > 2 Implementing the solution ?Translating to code@
/nce the correctness of algorithm is chec&ed, it can be translated to any
programming language
Step A 2 Testing the program
/nce the program is de$eloped it needs to be tested against $arious test
cases %hich chec&s if the program is correct for all e!pected range of inputs.
Step B + Deployment and .aintenance
In this module, the product or the output is gi$en to the customer or end user
for their purpose.
&ey elements re7d for problem sol$ing and programming "
5ood analytical s&ills
Declarati$e and imperati$e &no%ledge about the solution
'bility to apply abstraction
Cno%ledge in a programming language
ollo%ing good programming practices
<. 5ood analytical s&ills
'nalytical s&ill is the ability to use good reasoning in analy3ing a situation and
also the ability to sol$e the problem. 'nalytical s&ill can also be said as the
ability to organise a mass of data and dra% proper correlations, and then
interpreting these trends in terms that are meaningful to others.
Suppose you ha$e rain data for your to%n for the past thirty years, gi$en to
you at random, %ith no comments. Dou can organise the data chronologically,
then dra% a graph to demonstrate the data and then , by e!tending the
graph along its closest ,tting cur$e, you can ma&e reasonable predictions
about the e!tent of rain ne!t year, assuming that all other factors remain
8. Declarati$e and imperati$e &no%ledge about the solution
Declarati$e &no%ledge is the &no%ledge of %hat to do and imperati$e
&no%ledge is the &no%ledge of ho% to do. If you ha$e problem in hand and
%hen you &no% the solution of the problem then you ha$e declarati$e
&no%ledge. So E1hat isF type of &no%ledge is called declarati$e &no%ledge.
Imperati$e &no%ledge is a procedural &no%ledge %hich is the &no%ledge
e!ercised in the performance of some tas&. E:o% toF type of &no%ledge is
called Imperati$e Cno%ledge.
Declarati$e Cno%ledge"
This 1hat is type of &no%ledge is called Declarati$e &no%ledge
Imperati$e Cno%ledge"
This :o% to Cno%ledge is called Imperati$e Cno%ledge.
=. 'bility to apply abstraction
'bstraction %ill modulari3e the logic for a speci,c functionality in a computer
program. It %ill also hide comple!ity of implementation details of a function
behind a speci,c interface de,ned to in$o&e the function. It is recommended
that programmers use abstractions %hene$er suitable in order to a$oid
>. Cno%ledge in a programming language
' programming language is a formal language designed to communicate
instructions to a machine, particularly a computer. (rogramming languages
can be used to create programs that control the beha$iour of a machine
and#or to e!press algorithms precisely.
-lements of a programming language
<. Synta!" structural elements of the language. (rograms must be
syntactically correct.
8. 5rammar" de,nes ho% syntactical elements need to be combined to form
=. Semantics" de,nes meaning of the code
A. 5ood programming practices
' good programming practice is related to %riting e0cient and readable
code, a code %hich is easily maintainable.
cG intro
1hat is a $ariable6
' $ariable is nothing but a name gi$en to a storage area that our programs
can manipulate. -ach $ariable in CG has a speci,c type, %hich determines
the si3e and layout of the $ariableHs memory, the range of $alues that can be
stored %ithin that memory, and the set of operations that can be applied to
the $ariable.
The basic $alue types pro$ided in CG can be categori3ed as"
In CG, $ariables are categori3ed into the follo%ing types"
Value types
Reference types
Value Types
Value type $ariables can be assigned a $alue directly. They are deri$ed from
the class System.ValueType.
The $alue types directly contain data. Some e!amples are int, char, Ioat,
%hich stores numbers, alphabets, Ioating point numbers, respecti$ely. 1hen
you declare an int type, the system allocates memory to store the $alue.
The follo%ing table lists the a$ailable $alue types in CG 8J<J"
To get the e!act si3e of a type or a $ariable on a particular platform, you can
use the si3eof method. The e!pression si3eof?type@ yields the storage si3e of
the ob;ect or type in bytes. ollo%ing is an e!ample to get the si3e of int type
on any machine"
namespace DataType'pplication
class (rogram
static $oid .ain?stringLM args@
Console.1riteLine?NSi3e of int" KJON, si3eof?int@@P
1hen the abo$e code is compiled and e!ecuted, it produces the follo%ing
Si3e of int" >
Reference Types
The reference types do not contain the actual data stored in a $ariable, but
they contain a reference to the $ariables.
In other %ords, they refer to a memory location. .ore than one $ariable can
point to the same memory location, the reference types can refer to a
memory location. If the data in the memory location is changed by one of the
$ariables, the other $ariable automatically reIects this change in $alue.
-!ample of built2in reference types are" ob;ect and string.
/b;ect Type
The /b;ect Type is the ultimate base class for all data types in CG Common
Type System ?CTS@. /b;ect is an alias for System./b;ect class. So ob;ect types
can be assigned $alues of any other types, $alue types, reference types,
prede,ned or user2de,ned types.
ob;ect ob;P
ob; Q <JJP
ob; Q NTomNP
String Type
The String Type allo%s you to assign any string $alues to a $ariable. The
string type is an alias for the System.String class. It is deri$ed from ob;ect
type. The $alue for a string type can be assigned using string literals as
String str Q NTutorials (ointNP
The user2de,ned reference types are" class, interface, or delegate, %hich
shall be discussed later.