Upload
melanie-little
View
213
Download
0
Embed Size (px)
Citation preview
National Diploma Unit 4Introduction to Software Development
Introduction to Programming Languages
A brief history
Programming has its roots in the 19th CenturyMechanical looms were “programmed” using punched cards indicating the weaving patternCharles Babbage worked on a device- the Analytical Engine, for performing complex calculationsHe employed an assistant to produce the first working programs for this device – her name was Ada LovelaceAda is a programming language named in her honour
What is a program?
Computers are very stupid!They need to be told to do things with very precise instructionsComputers use binary code (“1”s and “0”s)This is called machine code and isn’t very easy for the programmer
Programming languages
Since we don’t speak binary and computers don’t use our language, an intermediate form was developedAssembly language uses simple words to represent binary codeThis is specific depending on the type of CPU Not easy to follow – especially in a large program
Assembly LanguageA typical assembler program would read something like this: LOAD M ADD M SAVE M
Think about what this program might be doingComplex calculations can take a long time to program in assemblerHowever, it is possible to access the values of individual registers - difficult in high level programming
High level languages
These use familiar words following a set pattern (the syntax)They are easier for us to learnThey are more difficult for computers since our code has to be translated into binary
Example languages
Pascal – proceduralC – proceduralVB – event drivenJava – Object orientedC++ - Object orientedSmalltalk – Object orientedOnly one of these is a pure O-O language – find out which
How computers run programs
Firstly, your code needs translating into binaryThis can happen all at once before running the program –compilingOr it can happen a line at a time - interpreting
Where Visual Basic fits in
It evolved from BASIC – Beginners All-Purpose Symbolic Instruction CodeIt was useful for learning programming but had a bad press because of its “spaghetti code” of “goto”s
Visual Basic appears Bill Gates was said to have been impressed with VB when it developedIt was flexible enough to allow you to write programs quickly which do not have much code, or to write much larger applicationsIts real strength was that it took advantage of the Windows environment and responded to user events
Visual Basic evolvesIt was (and still is) an event-driven languageHowever, to become even more powerful, VB has also become Object-based. This means that it supports many of the features of Object-Oriented languages such as C++ and JavaThe latest version VB.Net, is fully O-O compliant and gives greater web integration
Tasks
Find 2 more procedural languagesWhat are the principles of object oriented languages?What is a Very High Level Language? What systems are they used for?Find out some facts about the programming language COBOL