ZeePedia buy college essays online


Introduction to Computing

<<< Previous Low, High-Level, interpreted, compiled, structured & object-oriented programming languages Next >>>
 
img
Introduction to Computing ­ CS101
VU
LESSON 19
PROGRAMMING LANGUAGES
During the last Lesson ...
We continued our discussion on algorithms that we had started during the 16th lecture
In particular, we looked at the building blocks that are used in all algorithms
We also discussed the pseudo code and flowcharts for particular problems
In addition, we outlined the pros and cons of those two techniques
Last time we discussed what to implement
Today's Lecture
Today we are going to discuss the tool that is used to implement SW
To understand the differences among low- & high-level, interpreted & compiled,
and structured &
object-oriented programming languages
To understand the role of programming languages in computing
WHAT IS PROGRAMING (CODING) ?
The process of telling the computer what to do
TYPES OF PROGRAMS
Batch Programs
Event-Driven Programs
19.1 Batch Programs
These are typically started from a shell (or automatically via a scheduler) and tend to follow a pattern of:
Initialize internal data
Read input data
Process that data
Print or store results
Key feature: No user interaction with the computer while the program is running
Programming Language
A vocabulary and set of grammatical rules for instructing a computer to
perform specific tasks
19.2 Event-Driven Programs
Examples: GUIs, microwave, camera
The system sends events to the program and the program responds to these as they arrive.
Events can include things a user does - like clicking the mouse - or things that the system itself does -
like updating the clock.
These programs generally work as follows:
Initialize the internal data
Wait for events to arrive
Identify an incoming event and react accordingly
Programming Language
A vocabulary and set of grammatical rules for instructing a computer to perform specific tasks
All programs consists of:
Sequence of instructions
Conditionals
Loops
119
img
Introduction to Computing ­ CS101
VU
These may contain:
Data
Input/output (print, etc)
Operations (add, divide, etc)
Examples of Prog. Languages
Machine Language
Perl (1987)
Assembly Language (1956-63)
VisualBasic (1991)
LISP (1956)
PowerBuilder
PL/1(1964)
Ada(1983)
BASIC (1964)
C++ (1983-85)
Pascal (1970)
QBasic (1986 Java (1995)
Smalltalk (1972)
JavaScript
C (1972) Fortran (1957)
C# (2001)
COBOL (1959)
19.3 Types of Prog. Languages
High level Programming Languages
Low Level Programming Languages
High-level programming languages, while simple compared to human languages, are more complex
than the languages the uP actually understands, called machine languages each different type of
microprocessors has its own unique machine language lying between machine languages & high-level
languages are languages called Assembly languages
Assembly languages are similar to machine languages, but are easier to program in as they allow a
programmer to substitute names for numbers
Machine languages consist of numbers only.
4th-generation languages
High-level languages
Assembly languages
Machine languages
Regardless of what language you use, you eventually need to convert your program into a language that
the computer can understand
120
img
Introduction to Computing ­ CS101
VU
Two ways for doing that:
- compile the program or
- interpret the program
Interpreter is a program that executes instructions written in a high-level language
An interpreter translates high-level instructions into an intermediate form, which it then executes. In
contrast, a compiler translates high-level instructions directly into machine language
Compiled programs generally run faster than interpreted programs.
The advantage of an interpreter, however, is that it does not need to go through the compilation stage
during which the whole of the high-level code is translated into machine instructions in one go. This
process can be time-consuming if the program is long.
The interpreter can immediately execute high-level programs, without waiting for the completion of the
translation process
The choice of which language to use can also depend on the:
-Type of computer the program is to run on,
- Expertise of the programmer
Interpreters: immediate response, but execute code slowly.
Compilers: Takes longer to compile, but super-fast execution.
Both interpreters and compilers are available for most high-level languages.
However, BASIC and LISP were especially designed to be executed by an interpreter.
Why are there so many different programming languages?
What are the advantages of particular languages?
The question of which language is best is one that consumes a lot of time and energy among computer
professionals
Every language has its strengths and weaknesses
-Can a single language have all the good bits of other languages?
-Is there a perfect language?
-Do some good features force a language to also have bad features?
-What makes a feature good or bad?
-What makes a feature good or bad?
FORTRAN is a particularly good language for processing numerical data, but it does not lend itself
very well to large business programs
Pascal is very good for writing well-structured and readable programs, but it is not as flexible as the C
programming language
C++ embodies powerful object-oriented features, but it is complex and difficult to learn
What changes in the field of computer languages can we expect in the near future?
-Which programming language should you learn?
Should you learn more than one?
19.4 Programming SW Development
- SW Design Methodology ?
The set of (often flexible) rules and guidelines a team of developers follow to construct reasonably
complex SW systems
19.5 Object Oriented Design
OO SW is all about objects: a black box which receives messages & responds with those of its own
An object has 2 aspects:
State, also termed as properties, data
Example: For the bicycle: color, speed, pressure
Behaviors, also termed as methods, instructions
Example: For the same object: accelerate(), inflate()
In traditional design, these 2 aspects have been kept apart
121
img
Introduction to Computing ­ CS101
VU
The designer starts with any component (object) of the system; designs it as an independent, self-
contained system, and then moves to the design of some other component . The over-all system is put
together by fitting together a collection of these components.
Key feature: Details of the design of the component are kept independent of the over-all system.
Benefit: It can be easily re-used in other systems: design once; use multiple times
19.6 Structured Design
Also called top-down design
The designer starts by first conceiving a skeleton high-level design of the system, and then starts
defining features of that over-all design in an ever-increasing detail
Making small changes in the functionality of the systems sometimes leads to major re-design exercise
Structured design emphasizes separating a program's data from its functionality
Separating data from functionality typically leads to SW that is difficult to maintain & understand -
especially for large SW systems
19.7 Object-Oriented Languages
Programming languages specifically designed to make it easy to implement object-oriented designs
Examples: Smalltalk, C++, Java
Programming Languages
http://www.wikipedia.com/wiki/Programming_language
What is Object-Oriented Software?
http://catalog.com/softinfo/objects.html
VisualBasic: Taming the Wooly Mammoth
http://computer.org/software/so2000/pdf/s3016.pdf
During Today's Lecture, We ...
To understand the role of programming languages in computing
To understand the differences among low- & high-level, interpreted & compiled, and structured &
object-oriented programming languages
Focus of the Next Lecture:
The SW Development Process
Development process of reasonably complex SW systems does not consist of "coding" only
We will become familiar with the various phases of the process that developers follow to develop SW
systems of reasonable complexity
122
Table of Contents:
  1. INTRODUCTION
  2. EVOLUTION OF COMPUTING
  3. World Wide Web, Web’s structure, genesis, its evolution
  4. Types of Computers, Components, Parts of Computers
  5. List of Parts of Computers
  6. Develop your Personal Web Page: HTML
  7. Microprocessor, Bus interface unit, Data & instruction cache memory, ALU
  8. Number systems, binary numbers, NOT, AND, OR and XOR logic operations
  9. structure of HTML tags, types of lists in web development
  10. COMPUTER SOFTWARE: Operating Systems, Device Drivers, Trialware
  11. Operating System: functions, components, types of operating systems
  12. Forms on Web pages, Components of Forms, building interactive Forms
  13. APPLICATION SOFTWARE: Scientific, engineering, graphics, Business, Productivity, Entertainment, Educational Software
  14. WORD PROCESSING: Common functions of word processors, desktop publishing
  15. Interactivity to Forms, JavaScript, server-side scripts
  16. ALGORITHMS
  17. ALGORITHMS: Pseudo code, Flowcharts
  18. JavaScript and client-side scripting, objects in JavaScript
  19. Low, High-Level, interpreted, compiled, structured & object-oriented programming languages
  20. Software Design and Development Methodologies
  21. DATA TYPES & OPERATORS
  22. SPREADSHEETS
  23. FLOW CONTROL & LOOPS
  24. DESIGN HEURISTICS. Rule of thumb learned through trial & error
  25. WEB DESIGN FOR USABILITY
  26. ARRAYS
  27. COMPUTER NETWORKS: types of networks, networking topologies and protocols
  28. THE INTERNET
  29. Variables: Local and Global Variables
  30. Internet Services: FTP, Telnet, Web, eMail, Instant messaging, VoIP
  31. DEVELOPING PRESENTATIONS: Effective Multimedia Presentations
  32. Event Handlers
  33. GRAPHICS & ANIMATION
  34. INTELLIGENT SYSTEMS: techniques for designing Artificial Intelligent Systems
  35. Mathematical Functions in JavaScript
  36. DATA MANAGEMENT
  37. DATABASE SOFTWARE: Data Security, Data Integrity, Integrity, Accessibility, DBMS
  38. String Manipulations:
  39. CYBER CRIME
  40. Social Implications of Computing
  41. IMAGES & ANIMATION
  42. THE COMPUTING PROFESSION
  43. THE FUTURE OF COMPUTING
  44. PROGRAMMING METHODOLOGY
  45. REVIEW & WRAP-UP of Introduction to Computing