Академический Документы
Профессиональный Документы
Культура Документы
Software Categories
System Software
The system software controls the computer. It communicates with computers hardware (key board, mouse, modem, sound card etc) and controls different aspects of operations. Sub categories of system software are:
Operating System
Operating system is the software responsible for controlling the allocation and usage of hardware resources such as memory, central processing unit (CPU) time, disk space, and peripheral devices. The operating system is the foundation on which applications, such as word processing and spreadsheet programs, are built. (Microsoft)
MS Sadia Ejaz CIIT ATTOCK
The device driver software is used to communicate between the devices and the computer.
Utility software is a program that performs a very specific task, usually related to managing system resources.
Application software
A program or group of programs designed for end users. For example a program for Accounting, Payroll, Inventory Control System, and guided system for planes.
A DBMS is a complex set of software programs that controls the organization, storage, management, and retrieval of data in a database. It is a set of prewritten programs that are used to store, update and retrieve a Database.
Computer Viruses
A computer virus is a program which reproduces itself. It may attach to other programs, it may create copies of itself (as in companion viruses). It may damage or corrupt data, change data, or degrade the performance of your system by utilizing resources such as memory or disk space.
Computer Network
What is programming
Definition: "A program is a precise sequence of steps to solve a particular problem. It means that when we say that we have a program, it actually mean that we know about a complete set activities to be performed in a particular order. The purpose of these activities is to solve a given problem.
Language?
Way of communication When we communicate one another then we need a specific language to express our words Example
Computer Programming
Computer programming is defined as telling a computer what to do through a special set of instructions which are then interpreted by the computer to perform some task(s). These instructions can be specified in one or more programming languages including (but not limited to) Java, PHP, C, and C++.
Programming Language
A set of words, symbols and codes used to write a programs is called program language. Different programming languages are available for writing different types of programs.
Low-Level Languages
These are near to computer hardware and far from human language. Two low-level languages.
Machine Language
In this language, instructions are written in binary from. It is directly understood by the computer. Programs written in this language are machinedependent. It is also known as first generation language.
Assembly Language
Symbolic Language It is mostly used for writing system software. Second generation language.
High-Level Language
Procedural Languages
Third generation languages In these languages, program is a predefined set of instructions. Popular procedural languages .
FORTRAN FORmula TRANslation BASIC Beginner All Purpose Symbolic Instruction Code COBOL Common Business Oriented Language PASCAL C Middle-level language Application Software as well as System Software
Programs are written on the basis of objects. Object Collection of data and functions Easier to learn and modify. C++ and Java
Objects Classes Real-world Modeling Reusability Information Hiding Encapsulation Polymorphism Multiple ways
C++
Object-Oriented Language Developed in 1980 at Bell Lab. Improved version of C language. Powerful language.
History of C++
The C language was developed in late 60s and early 70s, in Bell Laboratories. In those days BCPL and B languages were developed there. The BCPL language was developed in 1967 by Martin Richards as a language for writing operating systems software and compilers. In 1970 Ken Thompson used B language to create early versions of the UNIX operating system at Bell Laboratories. Dennis Ritchie developed a general purpose language, called C language, by using different features of BCPL and B languages. In the early 1980's, also at Bell Laboratories, another programming language was created which was based upon the C language. This new language was developed by Bjarne Stroustrup and was called C++
When he designed C++, he added OOP (Object Oriented Programming) features to C without significantly changing the C component. Thus C++ is a "relative" (called a superset) of C, meaning that any valid C program is also a valid C++ program.
Non-Procedural Languages
Fourth-generation language Need to tell computer what to do not how to do. It is used in database application and report generation. Important Non-procedural languages.
Translator is required.
No translator is required.
Programs in high-level languages Programs in low-level languages are slow in execution. are fast in execution.
Programs in high-level languages Programs in low-level languages are easy to modify. are difficult to modify.
Fifth generation language Very complex Most of these languages are in experimental phase.
Types of Codes
Source Code
Object Code
Computer can not understand source code but directly understands object code.
Object Code
Object code is written in machine language through compilers. Object code is difficult to understand. Object code is difficult to modify. Object code contains more statements than source code.
Language Processor
Compiler
Source Program
Compiler
Object Program
Interpreter
Assembler
Assembler
Object Program
Interpreter
Compiler will stop translating if Interpreter will execute all the it finds an error and there will be lines before error and will stop at no executable code generated. the line which contains the error. Compiler compile the program as It converts one statement of a whole. program at one time.
Compiler generate object file. Interpreter generates no object file.
Programming Techniques
Structured Programming
A program is divided in small units called modules or sub-programs. Sequential Structure Control flows in logical sequence. Conditional/ Selective structure Selection on basis of condition
Iterative / Repetitive Structure Loops Function Call Control moves to block of code
Advantages
Disadvantage
Object-Oriented Programming
C ++ Java
Event-Driven Programming
Statements are executed in response to an event. For Example: Clicking the mouse button.
Visual Programming
Features of C++
It is very convenient language. It is a well-structured language. It is case sensitive language. It provides machine independent. It is an object oriented language. In C++. A program can be divided into small modules.
The format of writing program in C++is known as its structure. It consists of following parts.
Pre-processor Directive
It is an instruction given to the compiler before the execution of actual program. Include preprocessor directive is used in C++ to include header files in the program. # include <iostream.h>
Preprocessor Directive
Header files
Header Files
It is a collection of standard library functions to perform different tasks. There are many header files for different purposes. It must be included in the program before calling any of its function.
Main ( ) Function
It is the starting point of a C++ program. C++ statements are written in the body of the main () function. void main( ) { Body of the main function }
C++ Statements
C++ Statement
Using cout
Purpose of C++
Stroustrup states that the purpose of C++ is to make writing good programs easier and more pleasant for the individual
There are several versions of the C++ language, of which Visual C++ is only one. Other dialects include Borland C++, Turbo C++, and Code Warrior (Mac).
LAB WORK