Enlarging letters   Home   Information   Contacting   Map
Català   Castellano

Programming 1 (P1)

Credits Dept. Type Requirements
9.0 (7.2 ECTS) LSI
  • Compulsory for DIE
  • Compulsory for DCSFW
  • Compulsory for DCSYS
   

Instructors

Person in charge:  Jordi Petit Silvestre (jpetit@lsi.upc.edu)
Salvador Roura Ferret (roura@lsi.upc.edu)
Others:Albert Atserias Peri (atserias@lsi.upc.edu)
Amalia Duch Brown (duch@lsi.upc.edu)
Ana Edelmira Pasarella Sanchez (edelmira@lsi.upc.edu)
Christian Blum (cblum@lsi.upc.edu)
Edgar Gònzalez Pellicer (egonzalez@lsi.upc.edu)
Emma Rollón Rico (erollon@lsi.upc.edu)
Enrique Romero Merino (eromero@lsi.upc.edu)
Gabriel Alejandro Valiente Feruglio (valiente@lsi.upc.edu)
Joaquin Gabarró Vallés (gabarro@lsi.upc.edu)
Jordi Delgado Pin (jdelgado@lsi.upc.edu)
Juan Garcia-Villaraco Y Perez (joan.garcia-villaraco@upc.edu)
Leonor Frias Moya (lfrias@lsi.upc.edu)
M. Jose Blesa Aguilera (mjblesa@lsi.upc.edu)
Maria Josefina Sierra Santibañez (jsierra@lsi.upc.edu)
Omer Gimenez Llach (omer.gimenez@upc.edu)
Pilar Nieto Soler (pnieto@lsi.upc.edu)
Ramon Ferrer Cancho (ramon.ferrericancho@gmail.com)
Xavier Messeguer Peypoch (peypoch@lsi.upc.edu)

General goals

-

Specific goals

Knowledges

  1. Syntax and semantics of the expressions and instructions used in an imperative programming language (C++). Basic and structured data types. Functions and actions.
  2. Iterative and recursive design.
  3. Basic schemes on sequences and tables, classical algorithms.

Abilities

  1. When facing an elementary problem, find an elegant algorithm for solving it. Be able to code it with a subgroup of basic instructions of the imperative language C++
  2. Use editing, compiling and running tools to develop programs.
  3. Have resources to correct the programs when they don't work.
  4. Write programs with good style, with a relevant documentation, with the precise comments and the necessary specifications.



    .

Competences

  1. Ability to argue in a critical and logical-mathematical manner.
  2. Ability to think in abstract terms. Ability to tackle new problems by consciously using strategies that have proved useful in solving previous problems.
  3. Ability to understand problems: given a problem, distinguish between data (or starting elements), unknowns (or what is asked for), hypotheses, and the laws applicable.

Contents

Estimated time (hours):

T P L Alt Ext. L Stu A. time
Theory Problems Laboratory Other activities External Laboratory Study Additional time

1. Introduction
T      P      L      Alt    Ext. L Stu    A. time Total 
4,0 2,0 6,0 0 6,0 6,0 0 24,0
- Introduction to algorithmics and programming.
- Concepts: Computational problem, in, out, especification, algorithm, correctness, program, programming language, editor, compiler, interpreter, execution, testing.
- Elements: Type, value, literal, constant, variable, operator and expression. Assignation. Sequential construction. Conditional construction. Iterative construction. Basic input/output. Sintax of these constructions in C++.
- Programming environment.

2. Procedures
T      P      L      Alt    Ext. L Stu    A. time Total 
2,0 1,0 3,0 0 3,0 3,0 0 12,0
- Functions, actions, calls, parameter passing (input, output, input/output; real and formal parameters; value and reference passing)
- Variable scope
- Functional decomposition
- Basic library use

3. Linear algorithms and searches
T      P      L      Alt    Ext. L Stu    A. time Total 
2,0 1,0 3,0 0 3,0 3,0 0 12,0
- Sequences
- Linear scheme
- Search scheme
- Hybrid schemes

4. Recursivity
T      P      L      Alt    Ext. L Stu    A. time Total 
2,0 1,0 3,0 0 3,0 3,0 0 12,0
Introduction to the design of recursive algorithms

5. Tables and tuples
T      P      L      Alt    Ext. L Stu    A. time Total 
6,0 3,0 9,0 0 9,0 9,0 0 36,0
- Tables.
- Multidimensional tables
- Tuples.
- Scructuring and processing data with tuples and tables

6. Fundamental algorithms
T      P      L      Alt    Ext. L Stu    A. time Total 
4,0 2,0 6,0 0 6,0 6,0 0 24,0
- Basic sorting algorithms (selection, insertion and bubble)
- Dicotomic search
- Table merging
- Merge sort
- Effiency notions

7. Consolidation and personal study
T      P      L      Alt    Ext. L Stu    A. time Total 
0 9,0 6,0 0 21,0 20,0 0 56,0


Total per kind T      P      L      Alt    Ext. L Stu    A. time Total 
20,0 19,0 36,0 0 51,0 50,0 0 176,0
Avaluation additional hours 4,0
Total work hours for student 180,0

Docent Methodolgy

(-)

Evaluation Methodgy

There are several tests, all in front of computer
and consistent in resolving a problem.

During the course, there will be from 4 to 7 controls (including the partial exam) that evaluate the monitoring of the agenda contents up
to then. Teachers will be able to require that the
students deliver a few exercises of the collection
to be been able to present to the controls.

Let C be the weighted average of the controls. At the beginning of the course, the weights of each control will be made public.

In the period of exams, three tests will be
carried out (F1, F2 and F3) that evaluate the
totality of the contents. Not attending these tests will imply a qualification of NP.

Each problem is evaluated independently of the
others and receives a grading between 0 and 10 points,
according to the criteria that are given further
down on the correction of the problems. The final
note of the subject is

Max {(C + F1 + F2 + F3) / 4, (F1 + F2 + F3) / 3}.

Any attempt of fraud during the course will entail the application of the UPC's general academic normative and the beginning of a disciplinary process.


Problem correcting criteria:

A problem is defined with a description and one or more public tests.
Solving a problem consists on writing a correct program (according to the following) that passes all tests, both public and private. When a student considers his/her program is correct will send it to an automatic judge which, in a few seconds, will return a verdict about the behaviour of his program. No matter whether the program passes the private tests, the student can upload many solutions for the same problem. If, at the end of the exam, the student didn't send any program that passes all tests, the grade will be 0.

Otherwise, from all the successful programs, the teachers will manually correct the last one. If they detect that the student hasn't followed the basic programming rules, the program doesn't satisfy the problem or the algorithm is clearly inadequate, the grade will be 0

Otherwise, let v be the grade, between 0 and 5, given by the teachers to the corrected program (according to the clarity, style, etc), and let p be the number of programs sent that do not pass the tests. The grade is

5 + v - max{ p-1, 0 }.

According to this, a point on ten will be subtracted for each solution that doesn't pass the tests, but the first incorrect solution isn't penalized. Logically, a negative grade is converted to 0 (so 10 is the maximum number of incorrect uploads)

Basic Bibliography

  • J. Petit, S. Roura Col·leció de Problemes de P1, , .

Complementary Bibliography

  • F. Xhafa, P-P. Vázquez, J. Marco, X. Molinero, Á. Martín Programación en CPP para ingenieros, Thomson, 2006.
  • X. Franch, J. Marco, X. Molinero, J. Petit, F. Xhafa Introducció a la Programació - Exercicis resolts, Edicions UPC, 2006.

Previous capacities

(-)



 
logo FIB © Barcelona school of informatics - webmaster@fib.upc.edu - RSS RSS