This version of the course guide is provisional until the period for editing the new course guides ends.

Logo UAB

Programming 2

Code: 107890 ECTS Credits: 6
2025/2026
Degree Type Year
Computer Engineering FB 1

Contact

Name:
Jorge Bernal del Nozal
Email:
jorge.bernal@uab.cat

Teachers

Francisco Javier Massó López
Mireia Bellot Garcia

Teaching groups languages

You can view this information at the end of this document.


Prerequisites

Important information: The teaching guide was written with Catalan as the base language. The English translation may not be perfect, despite being manually translated and thoroughly reviewed. If you notice any errors or inconsistencies, please contact the teacher in charge.

The course does not have any official prerequisites. However, it is assumed that the student has taken the previous course (Programming I) and, therefore, is familiar with the basic structures of programming.


Objectives and Contextualisation

This subject is part of subject 3 (Computer Science) of the Computer Engineering Degree and should be seen as the logical continuation of Programming I. The basic objective is to delve deeper into the basic notions of imperative programming introduced in Programming I and introduce the principles of object-oriented programming. Thus, the training objectives proposed for the subject are the following:

  • Understand the software development life cycle: analyze the problem (understand what is being asked of us), design (propose a solution to the problem), implementation (coding in a programming language the chosen solution), testing (carrying out a test in a systematic way to ensure the correctness of the implemented solution).
  • Understand the concept of algorithm as a tool for solving problems with the computer and learn the fundamental concepts of algorithmics.
  • Understand the main structures of imperative programming and use them correctly to solve algorithmic problems of a certain complexity.
  • Know the different structures to represent information within algorithms, both static data types (tables, registers and character strings) and dynamic data types (stacks, queues, lists), to be able to use the most appropriate data structure to represent the information associated with an algorithmic problem.
  • Understand and correctly apply the basic principles of object-oriented programming: class concept and data encapsulation.
  • Provide the student with the ability to design algorithms to solve complex problems, progressively and systematically introducing a rigorous and structured programming methodology, based fundamentally on the technique of top-down algorithm design.
  • Program in a real programming language and know the different phases of developing a program: writing, compiling and assembling and executing and testing.
  • Develop programs following style rules aimed at achieving quality programs. These style rules include those that facilitate the understanding of the code, such as the use of comments, code indentation, the use of appropriate names for variables and functions, etc.
  • Be able to do an abstraction exercise to be able to transfer the theoretical concepts of the subject, especially those related to object-oriented programming, to different programming languages, such as C++ or Python.

Learning Outcomes

  1. CM04 (Competence) Validate the proposed solutions to problems in the field of computer science according to their requirements and the established conditions.
  2. KM06 (Knowledge) Identify the basics of structured, modular and object-oriented programming, as well as development tools and environments for creating high-quality software.
  3. KM07 (Knowledge) Identify the simple data types and complex data structures of high-level programming languages, as well as their storage in memory.
  4. SM09 (Skill) Analyse the programming needs of an IT system from the standpoint of the customer's need.
  5. SM10 (Skill) Use tools for program analysis, design, coding and debugging.
  6. SM11 (Skill) Develop graphics engine and gameplay software for videogames that behaves reliably and efficiently according to specifications, while integrating ethical, social, legal and environmental aspects.
  7. SM12 (Skill) Demonstrate the ability to work cooperatively in the development of IT applications.

Content

Topic 0: Review of basic programming structures

  • Review of basic programming structures: conditional and iterative structures, functions and procedures, tables, arrays, registers

Topic 1: Introduction to object-oriented programming

  • Introduction to the concept of class. Methods and attributes. Private and public part. Constructors and destructors.
  • Data encapsulation. Class composition.
  • Object persistence and serialization. Files.

Topic 2: Dynamic data structures

  • Concept of pointer. Operations with pointers.
  • Dynamic objects.
  • Dynamic arrays
  • Representation and implementation of dynamic data structures: lists, stacks and queues.
  • Use of dynamic data structures. STL library
  • Cost and complexity analysis

Activities and Methodology

Title Hours ECTS Learning Outcomes
Type: Directed      
Individual study to prepare for assessment tests 11 0.44 KM06, KM07, SM09, SM11, KM06
Theory and Exercises Sessions 50 2 CM04, KM06, KM07, SM09, SM10, SM11, CM04
Type: Supervised      
Follow-up of the resolution of the programming project 1 0.04 CM04, SM09, SM10, SM11, CM04
Type: Autonomous      
Implementation of the programming project 48 1.92 CM04, KM06, KM07, SM09, SM10, SM11, SM12, CM04
Problem solving 36 1.44 CM04, KM06, KM07, SM10, SM11, CM04

The teaching methodology of the course is based on the principle that “programming is the only way to learn how to program” and, therefore, it will focus primarily on the student’s practical work. The in-person sessions will be organized to introduce the theoretical content of the course from a very practical perspective, using examples, exercises, and programming problems that will be solved in class directly on the computer. One of the course’s objectives is to separate theoretical concepts (such as the definition of a class or file handling) from their implementation in a specific programming language, although the main language used in the course will be C++.

In addition to explaining theoretical concepts and solving small example problems during class, students will also carry out a programming project that must be developed mainly independently throughout the course (with occasional monitoring and guidance from the instructor). This project will allow students to practically integrate almost all the programming concepts and tools introduced in the in-person sessions by solving a real and complex problem.

Finally, a set of exercises and complementary activities (such as quizzes) will also be proposed, which must be completed individually throughout the course. Some of these exercises will be assessed and discussed during the in-person sessions and are intended to help students understand, integrate, and apply the concepts developed in class. In all course activities (in-person sessions, problems, and practicals), the main programming language will be C++, although complementary explanations will be provided on how to implement the most important concepts using Python.

Regarding in-person attendance, the course will not distinguish between theory, problem-solving, and practical sessions. The in-person sessions will be organized into four weekly hours in groups of around 40 students. During these sessions, the concepts outlined in the course syllabus will becovered. In some cases, explanatory videos may be made available to students, which they will need to watch before class. The sessions will have a very practical approach, with examples and exercises designed to facilitate the understanding and learning of the explained concepts. These exercises will be completed and discussed during the session and will serve to introduce the course content and demonstrate its practical application. Students are encouraged to bring their own laptops to class, if they have one, to complete the proposed exercises.

Students will need to complement the in-person classes with independent work, completing the proposed exercises, which are intended to help consolidate their understanding of the course content. It is important to note that the syllabus follows a logical progression throughout the course, so in order to follow a class properly, students must have assimilated the content from previous sessions. Some of these exercises will need to be submitted individually as part of the course assessment.

Additionally, students will work in pairs to complete a programming project that will be developed independently throughout the course, outside of the in-person sessions. This project will address a programming problem of a certain complexity, integrating most of the concepts explained during the course. Some in-person sessions will be dedicated to monitoring, tracking, and evaluating the work done on the project.

The course will be managed through the Caronte platform (http://caronte.uab.cat/), which will be used to access materials, manage practical groups, submit assignments, check grades, communicate with instructors, etc.

Annotation: Within the schedule set by the centre or degree programme, 15 minutes of one class will be reserved for students to evaluate their lecturers and their courses or modules through questionnaires.


Assessment

Continous Assessment Activities

Title Weighting Hours ECTS Learning Outcomes
Assessable activities to be carried out in class 10% 0 0 CM04, KM06, KM07, SM09, SM10, SM11
First partial exam 30% 2 0.08 CM04, KM06, KM07, SM09, SM11
Problem solving 10% 0 0 CM04, KM06, KM07, SM09, SM10, SM11, SM12
Programming project 15% 0 0 CM04, KM06, KM07, SM09, SM10, SM11, SM12
Second partial exam 30% 2 0.08 CM04, KM06, KM07, SM09, SM11
Self-assessment questionnaires 5% 0 0 KM06, KM07

The assessment of the course will be based on three types of activities:

  • Continuous assessment activities
  • Individual assessment through partial exams
  • Programming project

The final grade for the course will be calculated by combining these three activities as follows:

Final Grade = (0.25 × Continuous Assessment) + (0.15 × Project) + (0.6 × Individual Assessment)

1. Continuous Assessment (individual)

This section includes:

  • Submission of exercises proposed on the Caronte platform (10%)
  • Resolution and submission of small problems during class sessions (10%)
  • Self-assessment quizzes on Caronte, completed and submitted during class sessions (5%)

There is no minimum grade required in this section, but activities with expired deadlines cannot be recovered. Active participation in these activities is recommended, as they are key to assimilating knowledge in real time and provide valuable feedback to the teaching staff to adapt activities and delve deeper into concepts that may not have been fully understood.

2. Individual Assessment (individual)

Includes the results of individual tests taken during the course:

  • Two partial exams during the teaching period, held during class hours
  • One final exam during the official exam period, only for students who have not passed one of the two partial exams

If only one of the partial exams has been failed, the final exam will serve to recover only the corresponding part.

To pass the course, students must:

  • Obtain a minimum grade of 5 in each of the two partial exams
  • Obtain a minimum grade of 5 in the overall individual assessment

Calculation of the individual assessment grade:

Individual Assessment = (0.5 × Partial 1) + (0.5 × Partial 2)

3. Programming Project (group and individual)

Includes:

  • Assessment of the two project submissions (one mid-course and one final)
  • Ongoing monitoring of the project throughout the course
  • Possibility of an individual validation test to ensure all group members have contributed

To pass the project, students must:

  • Obtain a minimum grade of 5 in the final submission
  • Pass the individual assessment test

If the final submission grade is equal to or greater than 3, it may be recovered. In this case, the maximum grade that can be obtained is 7.

Single Assessment

Students who choose the single assessment option must:

  • Submit, on the indicated date, the assessable exercises specified at the beginning of the course
  • Submit the programming project
  • Take an individual assessment test covering the entire course content

This test will consist of two parts, corresponding to the two partial exams. A minimum grade of 4.5 must be obtained in each part to pass.

Calculation of the final grade in the single assessment:

Final Grade = (0.2 × Problem Submission on Caronte) + (0.2 × Project) + (0.6 × Individual Assessment)

The minimum grades required to pass are the same as in the continuous assessment. The same recovery system will also apply.

Special Cases of Final Grades

Not Evaluable:
A student will be considered Not Evaluable (NE) if they do not participate in any of the assessable activities of the course.

Fail:
If the course is not passed because one or more of the assessment activities do not meet the minimum required grade, the numerical grade recorded in the transcript will be the lower value between 4.5 and the weighted average of the grades.

Honours Distinctions:
The awarding of an Honours Distinction is at the discretion of the faculty responsible for the course. UAB regulations state that Honours Distinctions (HD) may only be awarded to students who have obtained a final grade equal to or higher than 9.00. Up to 5% of the total number of enrolled students may receive an HD. The criterion used to award them will be the final grade of the course.

Grade Reviews

For each assessment activity, the location, date, and time for review will be indicated, during which the student may review the activity with the teaching staff. In this context, students may submit grade appeals, which will be evaluated by the course instructors. If the student does not attend the scheduled review, the activity will not be reviewed later.

Repeating Students

This course does not offer differentiated treatment for repeating students. No project from previous years will be validated, as this is a new course with a renewed teaching team and methodology.

Important Note: Copying and Plagiarism

Without prejudice to other disciplinary measures deemed appropriate, and in accordance with current academic regulations, any irregularity committed by a student that may affect the grade of an activity will be sanctioned with a grade of zero (0). These activities cannot be recovered. If the activity in question is required to pass the course, the course will be automatically failed, with no possibility of recovery during the same academic year.

Irregularities include, among others:

  • Total or partial copying of a practice, report, or any other assessment activity
  • Allowing other students to copy
  • Submitting a group project not entirely completed by the group members
  • Presenting materials created by third parties as one’s own, including translations or adaptations
  • Using communication devices (phones, smartwatches, etc.) during theoretical-practical exams
  • Communicating with classmates during exams
  • Copying or attempting to copy from other students
  • Using or attempting to use unauthorized materials during exams

In these cases, the numerical grade in the academic record will be the lower of 3.0 or the weighted average of the grades, and therefore passing by compensation will not be possible.

For the evaluation of problem and practice submissions, code plagiarism detection tools will be used.

Assessment Schedule

The dates for continuous assessment activities and project submissions will be published at the beginning of the course. These dates may be subject to change due to unforeseen circumstances. All changes will be communicated via the Caronte platform, which is considered the standard channel of communication between faculty and students.

Use of Artificial Intelligence (AI)

In this course, the use of AI technologies is allowed exclusively as support, for example, for information search, program interpretation, doubt resolution, etc. The use of AI to complete programming tasks that are part of the assessment is not allowed.

Any work that includes AI-generated content will be considered a breach of academic integrity and treated as an irregularity under current regulations, potentially resulting in failing the course.

Additional Considerations

The following situations must be managed through the Academic Administration Office of the School of Engineering, which will inform the student of the applicable protocols and regulations:

  • Request for translation of assessment materials into a language other than Catalan
  • Request to reschedule assessment tests
  • Request to opt for single assessment

The teaching staff does not have the authority to make decisions on these matters and will comply with the resolutions of the School’s competent bodies.


Bibliography

  •  http://www.cplusplus.com/ : The C++ Resources Network
  •  https://es.wikibooks.org/wiki/Programaci%C3%B3n_en_C%2B%2B: Programación en C++ - Wikilibros
  •  https://www.sololearn.com/: SoloLearn
  • L. Joyanes, I. Zahonero: Programación en C: metodología, estructura de datos y objetos, Mc Graw-Hill, 2001.
  • B. Eckel. Thinking in C++, Volume 1: Introduction to Standard C++, Prentice-Hall, 1999.
  • B. Eckel. Thinking in C++, Volume 2: Standard Libraries and Advanced Topics, Prentice-Hall, 1999.
  • E. Valveny, R. Benavente, A. Lapedriza, M. Ferrer, J. García: Programació en Llenguatge C. Amb 56 problemes resolts i comentats. Servei publicacions UAB, 2009.
  • L. Joyanes, A. Castillo, L. Sánchez, I. Zahonero: Programación en C: libro de problemas, Mc Graw-Hill, 2002.
  • B.W. Kernighan, D.M. Ritchie: El lenguaje de programación C. 2ª Edición, Prentice Hall, 1986.
  • B.W. Kernighan, R. Pike: La Práctica de la Programación. Pearson Educación, 2000.
  • L. Joyanes Aguilar : Fundamentos de Programación: Algoritmos, Estructuras de Datos y Objetos. 3ª Edición, Mc. Graw-Hill, 2003.
  • J. Guttag. Introduction to Computation and Programming Using Python: With Application to Understanding Data. Second Edition. MIT Press. ISBN-10: 9780262529624.
  • S. Chazallet Python 3. Los fundamentos del lenguaje.  Eni, ISBN-10: 2409006140.
  • Steven F. Lott. Mastering object-oriented Python. Packt publishing, 2014.

Software

Any development environment in C++ and Python (Visual Studio Code)


Groups and Languages

Please note that this information is provisional until 30 November 2025. You can check it through this link. To consult the language you will need to enter the CODE of the subject.

Name Group Language Semester Turn
(PAUL) Classroom practices 411 Catalan/Spanish second semester morning-mixed
(PAUL) Classroom practices 412 Catalan/Spanish second semester morning-mixed
(PAUL) Classroom practices 431 Catalan/Spanish second semester morning-mixed
(PAUL) Classroom practices 432 Catalan/Spanish second semester morning-mixed
(PAUL) Classroom practices 451 Catalan/Spanish second semester afternoon
(PAUL) Classroom practices 452 Catalan/Spanish second semester morning-mixed
(PAUL) Classroom practices 471 Catalan/Spanish second semester morning-mixed
(PAUL) Classroom practices 472 Catalan/Spanish second semester afternoon