Unit 2
Unit 2
Unit 2
Variable Declaration
Basic Syntax
Data Type and Structures
Flow Control Structures (Conditionals and loops)
Functional Programming
Object-Oriented Programming
Debugging
IDEs and Coding Environments
Programming paradigms :
1. Imperative
2. Logical
3. Functional
4. Object-Oriented
Imperative: Computations are performed through a guided
sequence of steps, in which these variables are referred to or
changed. The order of the steps is crucial, because a given step
will have different consequences depending on the current
values of variables when the step is executed.
Advantages
o efficient;
o close to the machine;
o popular;
o familiar.
Disadvantages
o The semantics of a program can be complex to understand or
prove, because of referential transparency does not hold(due
to side effects)
o Side effects also make debugging harder;
o Abstration is more limitted than with some paradigms;
o Order is crucial, which doesn't always suit itself to problems.
o Advantages:
The advantages of logic oriented programming are bifold:
1. The system solves the problem, so the programming
steps themselves are kept to a minimum;
2. Proving the validity of a given program is simple.
o Languages
Functional languages are created based on the functional
paradigm. Such languages permit functional solutions to
problems by permitting a programmer to treat functions as
first-class objects(they can be treated as data, assumed to
have the value of what they return; therefore, they can be
passed to other functions as arguments or returned from
functions).
o Advantages
The following are desirable properties of a functional
language:
1. The high level of abstraction, especially when functions
are used, supresses many of the details of programming
and thus removes the possibility of commiting many
classes of errors;
2. The lack of dependence on assignment operations,
allowing programs to be evaluated in many different
orders. This evaluation order independence makes
function-oriented languages good candidates for
programming massively parallel computers;
3. The absence of assignment operations makes the
function-oriented programs much more amenable to
mathematical proof and analysis than are imperative
programs, because functional programs possess
referential transparency.
o Disadvantages
1. Perhaps less efficiencey
2. Problems involving many variables or a lot of
sequential activity are sometimes easier to handle
imperatively or with object-oriented programming.
Necessity System software are essential for Application software are not
operating the computer hardware. essential for the operation of the
Without these software, a computer computer. These are installed as
even may not start or function per the user’s requirements.
properly.
Installation System software are installed on the Application software are installed
computer when operating system is according to user’s requirements.
installed.
1. Linear
ar data structure
2. Non-linear
linear data structure
An array
An array with each element represented by an index
It works just like a queue of people in the ticket counter where first
person on the queue will get the ticket first. To learn more, visit Queue
Data Structure.
queue
In a queue, addition and removal are performed from separate ends.
Characteristics of an Algorith
Algorithm
Unambiguous − Algorithm should be clear and unambiguous. Each of its steps (or
phases), and their inputs/outputs should be clear and must lead to only one
meaning.
Input − An algorithm should have 0 or more well-defined inputs.
Step 1 − START
Step 2 − declare three integers a, b & c
Step 3 − define values of a & b
Step 4 − add values of a & b
Step 5 − store output of step 4 to c
Step 6 − print c
Step 7 − STOP
What is computer Graphics?
OR
Applications of Multimedia
Following are the common areas of applications of multimedia.
Multimedia in Business- Multimedia can be used in many applications in a business.
The multimedia technology along with communication technology has opened the door
for information of global wok groups. Today the team members may be working anywhere
and can work for various companies. Thus the work place will become global. The
multimedia network should support the following facilities:
o Voice Mail
o Electronic Mail
o Multimedia based FAX
o Office Needs
o Employee Training
o Sales and Other types of Group Presentation
o Records Management
Multimedia in Marketing and Advertising- By using multimedia marketing of new
products can be greatly enhanced. Multimedia boost communication on an affordable
cost opened the way for the marketing and advertising personnel. Presentation that have
flying banners, video transitions, animations, and sound effects are some of the elements
used in composing a multimedia based advertisement to appeal to the consumer in a way
never used before and promote the sale of the products.
Multimedia in Entertainment- By using multimedia marketing of new products can be
greatly enhanced. Multimedia boost communication on an affordable cost opened the
way for the marketing and advertising personnel. Presentation that have flying banners,
video transitions, animations, and sound effects are some of the elements used in
composing a multimedia based advertisement to appeal to the consumer in a way never
used before and promote the sale of the products.
Multimedia in Education- Many computer games with focus on education are now
available. Consider an example of an educational game which plays various rhymes for
kids. The child can paint the pictures, increase reduce size of various objects etc apart
from just playing the rhymes.Several other multimedia packages are available in the
market which provide a lot of detailed information and playing capabilities to kids.
Multimedia in Bank- Bank is another public place where multimedia is finding more and
more application in recent times. People go to bank to open saving/current accounts,
deposit funds, withdraw money, know various financial schemes of the bank, obtain loans
etc. Every bank has a lot of information which it wants to impart to in customers. For this
purpose, it can use multimedia in many ways. Bank also displays information about its
various schemes on a PC monitor placed in the rest area for customers. Today on-line
and internet banking have become very popular. These use multimedia extensively.
Multimedia is thus helping banks give service to their customers and also in educating
them about banks attractive finance schemes.
Multimedia in Hospital- Multimedia best use in hospitals is for real time monitoring of
conditions of patients in critical illness or accident. The conditions are displayed
continuously on a computer screen and can alert the doctor/nurse on duty if any changes
are observed on the screen. Multimedia makes it possible to consult a surgeon or an
expert who can watch an ongoing surgery line on his PC monitor and give online advice
at any crucial juncture.
In hospitals multimedia can also be used to diagnose an illness with CD-ROMs/
Cassettes/ DVDs full of multimedia based information about various diseases and their
treatment.Some hospitals extensively use multimedia presentations in training their junior
staff of doctors and nurses. Multimedia displays are now extensively used during critical
surgeries.
Multimedia Pedagogues- Pedagogues are useful teaching aids only if they stimulate
and motivate the students. The audio-visual support to a pedagogue can actually help in
doing so. A multimedia tutor can provide multiple numbers of challenges to the student to
stimulate his interest in a topic. The instruction provided by pedagogue have moved
beyond providing only button level control to intelligent simulations, dynamic creation of
links, composition and collaboration and system testing of the user interactions.
Communication Technology and Multimedia Services- The advancement of high
computing abilities, communication ways and relevant standards has started the
beginning of an era where you will be provided with multimedia facilities at home.