Академический Документы
Профессиональный Документы
Культура Документы
A set of instructions given to a computer which the computer will do or follow Also called as Software
Note:
Software is not just the programs but also all associated documentation and configuration data which is needed to make these programs operate correctly.
Programming
The act of preparing or writing a program using a particular language called a programming language.
Programmer
Someone who does the programming or the act of creating a program. It could be you or someone who already knows how to program a computer.
Types of Software
System Software
The kind of software that controls and takes care of the working computer and overall functioning of the system. The best example of system software is the operating system Ex. Windows XP, Windows ME, Windows XP, Linux, Unix, Apples OS
Application Software
Software that generally suited to perform a particular task or function Ex. Word Processor, Spreadsheet, Computer Games, Desktop Publishing Software and Graphics Program
Commercial Software
These are created and marketed by big software companies Usually made by a team of experts and computer professionals and are sold for quite a big price Ex. Microsoft Windows OS, MS Office
Shareware
Because of the high cost of software, many individual programmers made shareware Shareware, however is not really shared but is lent or allowed to be tested for a time before a fee is requested
Freeware
Given for free or allowed to be downloaded from the Internet. Programmers who create freeware do it as a service to users who cannot afford programs
Designing a Program
Types of Test
Unit Tests each program is tested individually Integration Tests checks units have been combined correctly System Tests to see whether the overall system functions correctly
Types of Errors
Syntax Errors caused by incorrect punctuation, misspelled reserved words and so on. Run-Time Errors division by zero and integer overflow that occurs during execution. Logical Errors difficult to detect coz the program executes but does not produce correct results.
Programming Language
A notation for expressing instructions to be carried out by a computer. A medium of communication between the human and the machine and often, between one human being and another.
Machine Language
Language of every computer The lowest level since it is machinespecific and is not designed for a specific structure of a problem Equivalent to the instructions for operating the home appliances but computers are usually written in codes of a sequences of 1s and 0s
Assembly Languages
Structurally similar to machine language except that the sequences of 0s and 1s are replaced by mnemonic names for the operator part of the instruction and numeric and alphabetic symbols are used for the operands but still low-level
High-Level Languages
Higher than machine and assembly Have program structure divorced from the structure of the machine that execute them Designed to facilitate the writing of solutions to problems they are designed to solve Ex. Pascal, COBOL, BASIC, Fortran
Declarative Language
The most English-like programming language in its most expressive power and functionality The highest level of language to its counterparts and focuses more on Object-Oriented Programming Ex. VB, Java, C++, Smalltalk
Assembler Languages
Uses: detailed control of hardware, used for internal computer control and operations Description: fast, efficient but require considerate effort and skill; has small program size
BASIC
Beginners All-purpose Symbolic Code Used mainly in education, business and at home Description: Easy to learn, but being nonstructured led to spaghetti style code, but later versions have updated to structured style
C
Uses: for systems and general programming Description: fast, efficient, and widely used, and popular among professional programmers
C++
Uses: for systems and general programming; commercial software development Description: developed from C, adding the advantages of objectoriented programming and more features such as streams
COBOL
COmmon Business Oriented Language Used for business programming Description: Oriented towards business and commercial applications not so easy to learn as it is quite wordy; widely used on mainframes
FORTRAN
FORmula TRANslation Used for scientific, mathematical and computational work Based on mathematical formulas; popular among engineers, scientists and mathematicians
Java
Developed for consumer electronics; used mainly for many interactive Web sites Multipurpose object-oriented language similar to C++ but is simpler; may also be used in other platforms
LISP
LISt Processing Used for artificial intelligence Symbolic language that is difficult to learn; widely used in universities and scientific research
PASCAL
General-purpose language Highly structured; easy to learn and widely used for teaching in programming in universities
PERL
Practical Extraction and Report Language Used for systems programming and web development Text and files are easily handled
PROLOG
PROgramming in LOGic Used in artificial intelligence Symbolic logic programming system It was intended for theorem solving but it is now used in artificial intelligence
Generations of PLs
First Generation
In 1940s and early 1950s, all coding was done in machine language Every machine has its own built-in code and this first generation of software every task was coded from scratch. It includes all low-level languages like machine and assembly
Note:
The word wasnt programming then, but coding and programmers were coders The word programmer originated in England, and when it finally crossed Atlantic in early 1950s it became more popular than coder
ACM
Association for Computing Machinery First formed for coding community in1947
Mark III
Developed by Howard Aiken First to have a coding machine
Second Generation
The development and distribution of machine-code subroutines, interpretive routines, automatic code generators and assemblers Ex. ALGOL-60, BASIC, COBOL and FORTRAN
BINAC
Binary Automatic Computer Developed by Mauchly and Eckert Short-Order Code a set of interpretive subroutines stored in memory developed by Mauchly for BINAC
Third Generation
High level language that came out and perfected in the late 1960s up to present Ex. Procedural, functional logic and object oriented languages such as Pascal, ADA, Lisp, Prolog, C++, Smalltalk and etc.
Fourth Generation
Domain specific languages Ex. Visual Basic, Delphi, Visual Age, C++ Also languages for database systems like SQL, Access, FoxPro, dBase and etc..
General Criteria
Readability is it easy to read and understand a program or portion of a program written in the language? Writability Is it easy to write programs in the language?
General Criteria
Reliability does the program help prevent errors? Cost how expensive is it to develop, use and maintain programs written in the language
Flowchart
- pictorial representation of the logical steps it takes to solve a problem
Algorithm
It is a finite set of instructions that specify a sequence of operations to be carried out in order to solve a specific problem or class of problems
Pseudocode
-English-like representation of the same thing. -Pseudo is a prefix that means false -Code program is to put in a programming language -False code or sentences that appear to have been written in a computer programming language but dont necessarily follow all the syntax rules of that language
Types of Flowchart
Program Flowchart It describes graphically in detail the logical operations and steps within a program and the sequence in which steps are to be executed System Flowchart a graphic representation of the procedures involve in converting data on input media to data output form
It is used to depict an input/output medium which is not specific. This is used in a logic flowchart.
It denotes a point where more than one path can be taken. It is based upon conditions, a branch to alternative paths is possible .
It is used to represent an instruction or group of instructions that will alter or modify a program.
It is non-processing symbol used to connect one part of flowchart to another without drawing flowlines.
Flowlines
It is used to designate entry to or exist from a page when a flowchart requires more than one page.
It denotes any written information on paper. It could be a source of document from which data is collected or final output
Variable
A character or group of characters that refers to a value and in the of a computer program, corresponds to an address
Types of Variable
Numeric Value Character, text or String Variables
Arithmetic Operations
+ * / Addition Subtraction Multiplication Division
Relational Operators
= > < <> >= <= Equal to Greater than Less than Not equal to Greater than or Equal to Less than or Equal to
Logical Operators
&& II ! AND OR NOT
Other Operators
EOF OAF CAF END START End of File Open All Files Close All Files End Start
Sequence
Process is executed from one to another in a straightforward manner
Selection (If-then-else)
A choice is provided between two alternatives
Repetition/Do While
It provides for the repetitive execution of an operation or routine while the condition is true.
Example of Sequence
Design a flowchart that will accept and display a number. Write its equivalent algorithms
Algorithm Step 1. Read in the value of N Step 2. Print the value of N
Example of Sequence
Draw a flowchart that will compute & display the sum of two numbers. Write its equivalent algorithm.
Initialize Sum into 0 Read in the value of A and B Compute the sum by adding A and B Print the computed value of Sum.
Advantages of Flowcharts
Advantages
Flowcharts are languageindependent, they can be learned and applied without formal knowledge of a programming language. It enforces users to give attention to significant matters over the less significant ones
Advantages
Being graphically portrayed, it provides an alternative to the usual narrative description of a system or a program Flowcharts are easier to understand than a program written in a particular programming language
Limitations of Flowcharting
Limitations
Flowcharts do not represent a programming language and are more of a person-to-person than a personto-computer means of communication. Since thinking in graphic terms is not normal, flowcharts cannot be viewed as a natural means of communication.
Limitations
Certain details often require a long sequence of interconnected symbols which could easily be described in just a few lines of explanation It does not convey why a given set operations is made Do not highlight the important details since each steps receives as much attention