Introdution

9:46 AM / Posted by BARATH THUSHYANTHAN /











· A computer is a machine which works from a set of pre-written instruction (Program). A computer will (under the control of its program) perform different things depending on the values of the data provided with from moment to moment. A computer program which is not built-in, but is brought into action as and when it is required.


· Application Generator - It is a program, which writes program such as Pascal, Oracle, VB and soon.


· Source program – It is human written program that is easy for a human being to read, write and understand. Example: writeln (Number), cin>Name. Object program (Binary) - It is machine understandable program, which is easy for a computer to read and act upon. Example: (Binary) 0111 0011 1001 0110.


· High Level Language – It is English like Statement Language, which is relatively easy for humans to follow. Example :- COBOL, FORTRAN, SQL, PASCAL. Low Level Language - It is Machine like Statement Language, Which is relatively easy for computers to translate and execute. But it is not natural for human beings. Example:- Machine code (binary), Mnemonic, Assembler.


· Serial Processing - One Process after another until all of the processes were completed. (Example: Program Instruction Processing). Parallel Processing - Processing where some operations run concurrently with others (Two Processes taking place in the computer at the same time. Example:-The peripheral controllers in the computer). Parallelism may exist between phases of an instruction’s execution between data transfer and processing, or between the operations of multiple independent processors.

what is programme?

· Programming language is a set of words, symbols, and codes that enables a programmer to communicate a solution algorithm to the computer. Needed to allow human begins and computer to talk to each other.


· A programmer can use a variety of programming language to code a program.


· A program development tool consists of user-friendly software products designed to assist both programmers and non-technical users with the creation of information system solution.

Generation of Programming Language.


· The first generation of language was the machine language. Machine language instruction uses a series of binary digits or a combination of numbers and letters that represents binary digits. Instructions and addressed were numerical.


· The second generation of language was the symbolic instructions or mnemonics and addresses. To convert the assembly language source program into machine language, you use an assembler. Example, IBM, BAL and VAX macro.


· The third generation language was the programmer concentration of structured programming and database management. Is a procedural language requires the program instruction tell the computer what to accomplish and how to do it. Example, FORTRAN, ADA, COBOL, Pascal, C and BASIC.


· The fourth generation (4GL) was the non-procedural type language, the programmer only specifies what the program should accomplish without explaining how. Example. SQL, Postscript, and relational database orientation.


· The fifth generation (5GL) was concerned on Artificial Intelligence and Fuzzy Logic.

Advantages and disadvantages of each generation of language.
· Readability of the language.
· Ease of writing the language.
· Reliability of the language.
· Cost of development.
· Syntax complexity.
· Language standards.


Data types and number Structures.
· Electronic Computers in the earliest days have represented everything stored and used within them (instructions, numbers, text – everything) in binary.


· Binary – a number systems to base 2, that is, with only two values, zero and one.


· Bit – Binary digit, can only have the value 0 or 1.


· Data Types:- It is a Format of Types assign to the data. The common Data Types are:-
A. Integer (Number)
B. Real (Number)
C. Character (Text)
D. Boolean (Logical)


· Integer:- Whole Numbers, This exist in several sizes ( Numbers up to 127 within seven bits, up to 32,767 within 15 bits and up to 2,147,483, 647 within 31 bits) , but the most commonly used is type int. This type requires two bytes of storage and holds numbers in the range -32,768 to 32,767). Example:- 1, 2, 30,000 and -27.


· Real :-Real number composed of a Mantissa and an Exponent. The Mantissa specifies the significant digits. The exponent is the power to which the base must be raised. Real - point data types represent numbers with a decimal place - like 3.1415927, 0.0000625, and -10.2. They have both an integer part, to the left of the decimal point, and a fractional part, to the right. Which are used for measurable quantities like distance, area, temperature, and so on, and typically have a fractional part.


· Character :- This data types made for storing letters, numbers and symbols (Alphanumeric). The letters such as:- "Abu, Ramu", Numbers value from -128 to 127 ( 1,3, 40,00, -555) and Symbols (@,%,&). This type commonly used to store ASCII characters (is a way of representing characters such as 'a', 'b', '$', '3').


· Boolean: –This is logical data, which can have the value, “True” or “False”. They can be held in one bit, and Conventionally, 1 = True and 0 = False.


· Byte – a group of 8 bits. A very common size for units of storage in computers.


· Hexadecimal – a number system to base 16. Occupies exactly 4 bits in Binary. Values are, in ascending order: 0 to 9, A, B, C, D, E, F (where A =10 & F = 15). “Carry” works exactly as in Decimal, with 16 being Hex 10; 255 being Hex FF and 256 being Hex 100.


Program Execution.


1. Production of source code


· The language used is defined for the programmer and the choice of language depends on what is appropriate for the task in hand, but also what is available within the organisation where the development is carried out.


2. Translation


· Compiler – A computer program that translates a Source Program into a semi-compiled program.


· Semi-compiled program – a program that has been partially translated from Source to Object form. It is still missing some standard routines from a library of routines. Interpreter – a computer program that translates and executes Source Programs statement by statement. Compilation, Linking and Execution are not separate.




3. Linking
o Linker – A computer program that takes a semi-compiled program and adds the required modules (standard routines) from library, to create an Object Program.

4. Running
o With the completion of linking, the program is able to execute and run at high efficiency.
o This situation is different in interpreted language, where the running happens at the same time as the translation.

· Methodology – a written-down set of rules for getting the most effective results (or to be more accurate, for avoiding the worst mistakes). It will tell you when it is a good idea to pause, make sure things are written down and get them checked so that you don’t “plough on” with some ideas or approach which will not deliver what is required.
· In the program development stage, every system’s development goes through a number of progressive stages that are in nature the development processes, which are:]

Feasibility (Can we do anything?)
Analysis (What exists? What is needed?)
Design (How will we do it)
Development (Create it; Check : a) It works, b) It does what's wanted)
Implementation (Install and use it)
Maintenance (Correct, update, extend)
Phase-Out (Replace, Decommission)

Feasibility Study
Determine the system requested is feasible. This will be determine by using four main Feasibility Studies.
Organizational Feasibility
Proposed system fits to their plans for integrating sales, marketing, and financial system.
Economic Feasibility
Savings in checkout costs.
Increased sales revenue
Increased profits
Decreased investment in inventory
Technical Feasibility
Capability, Reliability, Availability of hardware, Software and network also personnel.
Operational Feasibility
Acceptance of salespeople
Store management support
Customer acceptance

Requirement Analysis
1.
This is carried out to understand what is wanted, through means of interviewing, holding meetings and reviewing existing processes (if any).
2. Once it is known what is wanted, it is then written down so that people can see what is being requested and agrees that this specifies – clearly, completely and unambiguously.
3. If the requirement analysis is not clear, complete and unambiguous, then everything else from there on is being built on very weak foundation, and is very likely to be seriously deficient

Design
1.The design should be understood by the technicians in the detail of the requirement.
2.The system specification is developed to satisfy the requirement and agreed to the developing a solution in this manner.
3.Once the system specification is agreed, the System Design is developed with details of the programs needs, the input they receive, the output they produce, the data they work with and the formulae they employ.


Example of Functional Requirements
User Interface Requirements

Easy-To-Use
Processing Requirements
Fast, Automatic Calculation
Storage Requirements
Fast retrieval and update of data
Control Requirements
Signal for data entry errors


Development
1.
This is the process of developing actual system that will satisfy the functional requirements of the proposed system.
2. Here they will determine the same standard of codings
3. At the end of the session they will:-
All the coding must works
It should be bug free
It should be readable and maintainable
.


A Few other Things to be checked on:
Building Modification
Equipment purchase
Power Cabling
Training Courses
Conversion Programs
Backup and Restore Programs
Installation Routines
De-Installation Routines


Testing


"Why Do We Need Testing"


1. Testing is used often as a means of determining quality and proving that software is fit for its purpose.
2. It is not just to be sure that a program meets technical requirements, but also that it is economical and maintainable.
3. A contents checklist of testing.
Contents
Testing Philosophy
File Creation
Program Suite Input
Program Suite Output
Input / Output Handling
Test Data


4. Testing is an extension of V & V procedures
Verification
Validation

Verification
Attempts to find errors by executing a program in a tested or simulated environment. This Checks that the work requirement specified at the beginning of any phase of work has been completed at the end.


Validation
Is the process of finding errors by executing a program in the real environment. This provides a global check that all the functional, safety and contractual requirements specified have been completed at the end of the project.

Implementation
1. Where the old system is stopped and new system is introduced.
2. Test the system, and train people to operate and use it.
3. Acquire hardware and software.

Maintenance
1. It is post implementation review process to monitor, evaluate and modify the system as needed.

Phase out
· This is the process of changing the system as a whole.
· The developers will create better system which is best suited to their needs and wants.



The source code is required to be translated into the object code (which the machine executes) as being a simple case of compilation or interpretation.
There are two main modes of translation of the language:
1. The Compiler
The first thing which the compiler does with your source program is to Syntax Check it - in other words, to see if it can make sense of it. It does this by applying the rules of the language - its "grammar" if you will - to make sure that none of them have been broken. In any human language, we can be very "loose" with the grammatical rules, and people will still understand what you mean. Programming languages are not like that. You must adhere precisely to the rules of grammar. Even a missing full stop in a language like COBOL can have far- reaching effects, causing errors that are difficult to identify and pin down.

Given that none of the rules have been obviously broken - and the compiler will not let you continue if they have - the compiler starts to translate the program.

Translation proper starts by working out what goes where, by building a map or index for the named areas of storage you have formally defined. This is easy in COBOL (where it is all laid out in the Data Division) and less easy in some versions of BASIC, where you do not always have to define a storage area before using it.

The compiler then scans the procedures you have written, extracting the data names that have been used. By the end of this process, in a language like COBOL, there should be no data names mentioned in the Procedure Division of the program, which have not been defined in the Data Division. If there are, the programmer has made a mistake! In a language like BASIC, however, you cannot be so certain. For this reason, even when writing programs in BASIC, it is considered good practice to define all of the data areas, so that if the compiler flags any undefined names, they are probably mistakes.

Either on the same scan of the procedures, or on separate scans (it depends on the particular compiler) two lists will be built up - one of the procedures called, and one of the procedures found. If the program uses a procedure, then that procedure must exist. Very often, it will be somewhere within the same program, but quite possibly it will be a standard routine that exists elsewhere. The compiler matches up the list of procedures needed with the list of procedures found in the program, and produces another list - of procedures it couldn't find. This is the list of "external references" which are expected to be on some library somewhere.

Finally, the compiler encodes the operations that have been specified in the written procedures - things like "ADD" or "MOVE" (from COBOL) or "=" or "^" (from BASIC) or "+" or "- " (from either).

At this point, some - but not all - of the program is in a form that could be executed. However, there are the external references to deal with. The compiler stores the work so far, and finishes.

The program is in what we call "semi-compiled" form at this juncture. It is a good idea for the programmer to check the compiler's report of the unresolved references to identify any that should not be there, correct them, and re-compile. This usually arises because a resolvable reference has been mis-typed, but perhaps a routine has been forgotten about, or was expected to be provided by someone else, yet remains "absent without leave".

The Linker
It is the linker's task to resolve all of the (intentional) external references. To do this, the linker reads the list of external references generated by the compiler, and attempts to identify matching routines on the library files to which it has access.

Once it has built a match-list, the linker reads the semi-compiled program and adds the required routines from the libraries. Then it replaces the external references by internal references (because the "missing" routines are now present). Now virtually the entire program is executable, and it is written to an output file in what we normally and slightly incorrectly call "object form".

"Slightly incorrectly" because there may still be unresolved references, and these fall into two categories. Mistakes have to be dealt with by the programmer, which involves editing the source code, re-compiling and re-linking. Other references are to routines that may be shared between all programs that use them, and are not properly part of any individual program. These external references can only be resolved when the program is about to be run - and that is done by the loader or binder.

The Loader
It is the Loader that brings our complete program into the computer to be executed. Clearly, this is the last opportunity for external references to be resolved, and these are expected to be references to routines which are already present in the computer's memory.

If the routines are not present, an attempt is made to locate them (they would normally be optional modules of the operating system) and to load them. Then the remaining external references can be resolved making the program truly executable, and it is started.

Some systems allow this "fully bound" version of the program to be stored for later use. This leads to very fast loading, but does not allow for the efficiencies if inter-program code sharing.
Summary - Compiler, Linker and Loader
The compiler checks to see if the rules of the language are applied and adhered precisely
The linker resolves all of the external references to build the routines on the library files to which it has access.
The loader brings our complete program into the computer to be executed.

2. Interpreter
Having understood the translation process for compiled languages, the translation process for interpreted languages may be explained relatively quickly. Think of "interpretation" as "statement-by-statement, on-demand compilation, linking and execution".

Actually, interpretation as characterized above - where a statement is typed in, then immediately obeyed - is more strictly called "immediate-mode interpretation". This is to distinguish it from "deferred-mode interpretation" where all the statements are typed in, and then the program is run without any (separate) compilation process.

Interpretation - whether immediate or deferred - is fundamentally an on-line process, with the user at a terminal interacting directly with a computer.

BASIC was originally conceived as an interpreted language; compiled versions being very much a deviation from the original intentions. In BASIC, in response to the "Ready" prompt, you can type:

PRINT "Hello Mum!"

and the system would immediately respond on your terminal:

Hello Mum!
Ready

This is Immediate Mode. The statement has been syntax checked, compiled, linked and executed. However, if you precede the command with a number, like this:

20 PRINT "Hello Mum!"
the system only syntax checks the statement and (if it is OK), provides you with the next line number, it does not obey the command. The program is only executed when you enter a "RUN" command. This is Deferred Mode, where

compilation, linking and execution are deferred until a RUN command is given.

Summary Interpreter
This form of translation provides a “statement-by-statement” on-demand compilation, linking and execution.

Error Messages
Error Messages can be encountered at any stage of the translation process from source to object program.
There are different types of errors.
Syntax Error
Logic Error
Runtime Error
Semantic Error
Syntax Error
This is the error due to violations of grammatical rules and format of the programming language.
It can be detected by both compilers and interpreters.
Syntax errors are also known as compilation errors.
Example
· Invalid Data names
· Undefined Variables
· Wrong Spelling of Keywords

Logic Error
o This is an error due to misunderstanding of requirements or incorrect algorithms used, resulting in an incorrect result.
o This type of error cannot be detected by both compiler and interpreter.
Example
· Area = Length + Breadth
(Which support to be "Area= Length * Breath"
Runtime Error
o This type of error can be detected only during the running of the program.
o It also cannot be detected by either compiler or interpreter.
Example
· Input / output error during execution
· Calculation of non-numeric data
· File opened but not closed during execution

Semantic Error
o This type of error occur only due to misunderstanding of a syntax of the meaning of a programming language.
o This type of error cannot be detected by both compiler and interpreter.
Example
· A = B + C * D
(The syntax of the programming language will do "C * D" first then add "B" but the programmer interprets it as "B + C" first and then add "D" later.)







Labels:

0 comments:

Post a Comment


Click here for Myspace Layouts