Unit 1 Fun Pro I1
Unit 1 Fun Pro I1
Elements of Programming y
Languages
Scope
1.1. Introduction
1.2. Basic concepts
1.3. Programming languages
1.4. Syntax and semantics
1.5. Structure of a program
1.6. Errors in a program
1.7. Software engineering
Recommended bibliography
Programming Fundamentals I
1.1 Introduction (I)
• Informatics (Computing) definition from ACM/IEEE CC-2005:
– Any activity which implies, takes advantage or develops
computers. It includes:
• Design and development of software systems and
hardware
• Processing and managament of various types of
information
• Development of scientific studies by computer
• Design of intelligent behaviours for computers
• Creation and use of comunicación and entertaiment
media
• Search and retrieval of relevant information for a
concrete goal
• Etc.
• This “definition” and its content is continuously evolving
Programming Fundamentals I 2
1.1 Introduction (II)
• Division (sub-areas) of this field:
Informática
(Computing)
Programming Fundamentals I
1.1 Introduction (III)
• Reach of each sub-area:
– Computer Science
• It works many fields from the most theoretical part, like
the algorithmic fundamentals of Informatics, to the last
development in robotics, artificial vision, bioinformatics,
intelligent systems, etc... It is a scientific vision (study
and establishment of the underlying principles on
Informatics and the determination and creation of new
application areas) rather than applied (application and
use of existing technologies).
Programming Fundamentals I 4
1.1 Introduction (IV)
• Reach of each sub-area:
– Computer Engineering
• It is focused on the development of computers and
system based on computer. It involves studying
hardware, software, communication y its interaction.
– Software engineering
• Its goal is to develop and maintain software systems
which work in an efficient y feasible way and whose
development and maintenance is possible satisfying the
custom requirements.
Programming Fundamentals I 5
1.1 Introduction (V)
• Reach of each sub-area:
– Information technology
• It is focused on the application, deployment and configuration
of systems to satisfy the needs of organizations or individuals.
Most of times it is used in a general way as synonym of
Informatics. The focus are mainly applications.
– Information Systems
• It is focused on the application of solutions from information
technologies to business process in order to satisfy the
information processing needs of companies and other
organizations. This sub-area is specialized in information and
processes which generate, process y distribute this
information. This last sentence is close to definitions of
Informatics. In this case the use of solutions as well as the
study of principals referring to computational systems and
organizational needs.
Programming Fundamentals I 6
1.1 Introduction (VI)
• Relationships between sub-areas (the focus of each one is
represented):
CE CS SE IT IS
Hardware Organizational
Software
needs
• Software:
l Is the set of programs by the computer
l Software of the system (Operating system and system tools)
• Applications
l Algorithm:
l Precise description of the necessary steps to solve a problem.
Programming Fundamentals I 8
1.2. Basic Concepts(II)
• Instruction:
l Sequence of symbols which presents an order which is executed
by the computer
• Program:
l Is a set of instructions which defines in a precise way what the
computer should perform.
l A program is written using a programming language
l Example of program:
class Begin{
public static void main(String [ ] args) {
System.out.println ("Hello world");
} // End of main
} // End of class
Programming Fundamentals I 9
1.3 Programming languages (I)
• Depending on the abstraction level
– Machine languages
– Assembly languages
– High-level languages
– Four-generation languages (4GL)
Source code
(Código fuente)
Compilation process
Object Code
(Código objeto)
Libraries
Linking process
(Biblotecas o
(Enlazado)
librerías)
Binary Code
(Código binario
o ejecutable)
Programming Fundamentals I 11
1.3 Programming languages (III)
• Interpreted languages
Partial
compilation
Source
Execution
Code
1.3 Programming languages (IV)
• Approach followed by Java
Source
Code Java
Compilation
Interpretation
Machine
Bytecode Language
Programming Fundamentals I 13
1.4. Syntax y semantics
• Definition according to María Moliner
– Semantics: Study of the meaning of the linguistics
units
– Syntax: Is the way of linking and ordering words
within a sentence or several sentences
Programming Fundamentals I 14
1.5. Structure of a program (I)
General structure:
Main
Program
Subtask 1 Subtask 1
Monolithic program
Programming Fundamentals I 16
1.6. Errors in a program
• Types of errors
– Compilation errors
– Runtime errors
– Logic errors
• Detection of errors
– Compilations errors
– Runtime errors
– Logic errors
Programming Fundamentals I 17
1.7. Software engineering (I)
• The crisis of the software
• Software engineering: “Application of a systematic approach,
disciplined and quantifiable to the development, operation and
maintenance of software”
• Concept of Software Development Cycle Life
Conception of Elimination of
the software Development Operation software
system system due to
obsolescence
Maintenance
Programming Fundamentals I 18
1.7. Software engineering (II)
• Stages of the life cycle
– Analysis
– Design
Development
– Implementation
– Testing
– Maintenance
• Adaptive
• Corrective
• Perfective
• Preventive
Programming Fundamentals I 19