
Programming 2
Code: 107890Credits: 6
| Degree programme | Type | Course |
|---|---|---|
| Computer Engineering | FB | 1 |
Contact lecturer
- Name :
- Jorge Bernal Del Nozal
- Email :
- jorge.bernal@uab.cat
Teaching staff
- Mireia Bellot Garcia
- Yael Tudela Barroso
- Antonio Lozano Bagen
- Miguel Hernández Cabronero
- Marc Ortega Gil
- Miguel Carpio Miranda
Group languages
You can consult this information at the end of the 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
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
- CM04 (Validate the proposed solutions to problems in the field of computer science according to their requirements and the established conditions.) Validate the proposed solutions to problems in the field of computer science according to their requirements and the established conditions.
- KM06 (Identify the basics of structured, modular and object-oriented programming, as well as development tools and environments for creating high-quality software.) Identify the basics of structured, modular and object-oriented programming, as well as development tools and environments for creating high-quality software.
- KM07 (Identify the simple data types and complex data structures of high-level programming languages, as well as their storage in memory.) Identify the simple data types and complex data structures of high-level programming languages, as well as their storage in memory.
- SM09 (Analyse the programming needs of an IT system from the standpoint of the customer's need.) Analyse the programming needs of an IT system from the standpoint of the customer's need.
- SM10 (Use tools for program analysis, design, coding and debugging.) Use tools for program analysis, design, coding and debugging.
- SM11 (Develop graphics engine and gameplay software for videogames that behaves reliably and efficiently according to specifications, while integrating ethical, social, legal and environmental aspects.) Develop graphics engine and gameplay software for videogames that behaves reliably and efficiently according to specifications, while integrating ethical, social, legal and environmental aspects.
- SM12 (Demonstrate the ability to work cooperatively in the development of IT applications.) Demonstrate the ability to work cooperatively in the development of IT applications.
Contents
Topic 0: Introduction. Review of development tools (IDE, Git)
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. Inheritance.
- Object persistence and serialization. Files.
- Computational complexity.
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.
Topic 3: Standard Template Library
- Introduction to the concept of Template
- Using dynamic data structures with the STL library (vector, list, queue, stack)
Topic 4: Introduction to Python
- Basic syntax. Conditional, iterative structures, functions.
- Object orientation.
- Object serialization. Files.
- Data structures (dictionaries, sets, lists)
Learning activities and methodology
| Title | Hours | ECTS | Learning outcomes |
|---|---|---|---|
| Follow-up of the resolution of the programming project | 1 | 0.04 | CM04, SM09, SM10, SM11 |
| Individual study to prepare for assessment tests | 11 | 0.44 | KM06, KM07, SM09, SM11 |
| Problem solving | 36 | 1.44 | CM04, KM06, KM07, SM10, SM11 |
| Implementation of the programming project | 48 | 1.92 | CM04, KM06, KM07, SM09, SM10, SM11, SM12 |
| Theory and Exercises Sessions | 50 | 2 | CM04, KM06, KM07, SM09, SM10, SM11 |
Here is the English translation, maintaining the professional and institutional tone suitable for a university course syllabus:
The teaching methodology of the course is based on the principle that "programming is the only way to learn how to program" and will therefore focus primarily on the student's practical work. Classroom sessions will be organized to introduce the theoretical content of the course from a highly practical perspective, using examples, exercises, and programming problems that must be solved in class directly on the computer. One of the objectives of the course 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 vehicular language of the course will be C++.
In addition to the explanation of theoretical concepts and the resolution of small problems as examples during classes, students must carry out, in pairs, a programming project that will be developed autonomously throughout the entire course, outside of classroom hours. This project will address a programming problem of a certain complexity, integrating most of the concepts explained during the course. Throughout the academic term, some classroom sessions may be dedicated to the control, monitoring, and evaluation of the work performed.
Finally, a set of exercises and complementary activities (such as quizzes) to be solved individually throughout the course will also be proposed. All exercises that form part of the assessment will be completed during class sessions, with the goal of having the professor guide and support the learning process while it takes place in the classroom. Likewise, additional exercises will be proposed for students to practice at home, which will not count toward the final grade. This is due to the proliferation of AI usage by students in completing these exercises, which gives them false confidence regarding the assimilation of knowledge they have not effectively acquired. Therefore, this year, full weight will be given to activities where the professor can ensure that the student has personally completed the assigned task.
In all course activities (classroom sessions, problem-solving, and lab assignments), the C++ programming language will be primarily used, although how to code the most important concepts using Python will also be explained as a complement.
Regarding attendance, the course will not distinguish between theory, problem-solving, and practical lab sessions. Classroom sessions will be organized into four hours per week in groups of about 40 students. During these sessions, the concepts detailed in the course syllabus will be addressed. In some cases, explanatory videos will be made available to the student, which must be watched before class. The sessions will have a highly 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, serving to introduce the course content and demonstrate its practical application. It is recommended that students bring their own laptop to class, if available, to perform the proposed exercises.
It is important to keep in mind that the syllabus has a logical continuity throughout the course; therefore, to properly follow a class, it is necessary to have assimilated what was covered in previous sessions.
The management of the course teaching will be carried out through the UAB Virtual Campus, which will be used to consult materials, manage lab groups, submit assignments, check grades, communicate with the teaching staff, etc.
Assessment
Continuous assessment activities
| Title | Weight | Hours | ECTS | Learning outcomes |
|---|---|---|---|---|
| Second partial exam | 45.5% | 2 | 0.08 | CM04, KM06, KM07, SM09, SM11 |
| First partial exam | 19.5% | 2 | 0.08 | CM04, KM06, KM07, SM09, SM11 |
| Assessable activities to be carried out in class | 15% | 0 | 0 | CM04, KM06, KM07, SM09, SM10, SM11 |
| Programming project | 20% | 0 | 0 | CM04, KM06, KM07, SM09, SM10, SM11, SM12 |
Here is the English translation, keeping the clean and scannable formatting with the formulas in plain text:
Subject evaluation will be based on three types of activities:
- Continuous evaluation activities
- Individual evaluation (midterm exams)
- Programming project
The final grade for the course will be calculated by combining these three activities using the following formula:
Final Grade = (0.15 * Continuous Evaluation) + (0.2 * Project) + (0.65 * Individual Evaluation)
It is essential to obtain a grade equal to or higher than 5 in both the Programming Project and the Individual Evaluation to be eligible to pass the course. The Final Grade of the course must be equal to or higher than 5 to pass.
1. Continuous Evaluation (Individual)
This section represents 15% of the final grade and includes:
- Solving and submitting short problems during class sessions.
- Self-assessment questionnaires on the Virtual Campus, completed and submitted during class sessions.
Important: There is no minimum grade requirement for this section, but activities whose submission deadlines have expired cannot be retaken. Active participation is highly recommended, as these activities are key to assimilating knowledge in real time and allow teaching staff to adapt classes by reinforcing the concepts that raise the most doubts.
2. Individual Evaluation
This section represents 65% of the final grade and includes the individual tests conducted during the course:
- Two tests during the teaching period, a first midterm and a final exam. The first midterm does not exclude material for the final exam. The final exam will cover content explained throughout the entire course.
- A retake test, intended solely for students who have not passed the individual evaluation.
The grade calculation for this block will be carried out as follows:
Individual Evaluation = maximum((0.3 * First Midterm Grade) + 0.7 * Final Exam Grade, Final Exam Grade)
It is necessary to have a grade equal to or higher than 5 in the Final Exam (or retake test) to be able to pass the Individual Evaluation and the course.
3. Programming Project (Group and Individual)
This section represents 20% of the final grade and includes:
- Evaluation of the two project submissions: an intermediate one (Intermediate_Grade) and a final one (Final_Grade).
- Project monitoring during the course (Individual_Grade). An individual validation test may be carried out to guarantee the equitable and effective participation of all group members.
The project grade will be calculated using the following formula:
Project Grade = (0.2 * Individual_Grade) + (0.3 * Intermediate_Grade) + (0.5 * Final_Grade)
Requirements to pass the project:
- Obtain a minimum grade of 5 in the final submission (Final_Grade).
- Obtain a grade higher than 5 in the project monitoring (Individual_Grade).
Project recovery:
- The final project submission can be recovered if the grade for the regular submission is not 5.
- The individual validation test can be retaken in the recovery exam.
Single Evaluation
Students who opt for the single evaluation modality must:
- Submit the programming project.
- Take an individual evaluation test that will include all course content.
This individual test will be identical to the final exam taken by the rest of the students in the course and will require a minimum grade of 5 to pass.
Final grade calculation for single evaluation:
Final Grade = (0.15 * Project) + (0.85 * Individual Evaluation)
The minimum grades required to pass and the retake system are the same as those applied in the continuous evaluation.
Special Cases in Final Grades
- Non-Evaluable (NA): A student who does not participate in any of the evaluable activities of the course will be considered non-evaluable.
- Fail: If the course is not passed because one of the activities does not reach the minimum required grade, the numerical grade that will appear on the transcript will be the lower value between 4.5 and the weighted average of the grades.
- Honors (Matrícula de Honor - MH): The awarding of this qualification is the exclusive decision of the teaching staff. In accordance with UAB regulations, it can only be granted to students with a final grade equal to or higher than 9.00, up to a maximum of 5% of the total number of students enrolled. The assignment criterion will be the final grade of the course.
Review of Grades
For each evaluation activity, the place, date, and time of the review will be published. This is a space where students can examine their test alongside the teaching staff and submit complaints. If the student does not attend within the established schedule, they will forfeit the right to review that activity later.
Repeating Students
This course does not offer differentiated treatment for repeating students. Since this is a new course with a renewed teaching team and methodology, no grades for theory, continuous evaluation activities, or projects from previous years will be recognized or transferred.
Important Note: Cheating and Plagiarism
Any irregularity committed by a student that may affect the qualification of an evaluable activity will be sanctioned with a grade of zero (0) in that activity, which will not be retakable. If the activity is mandatory to pass the course, the course will be considered automatically failed without the possibility of a retake in the same academic year.
Irregularities include, among others:
- Total or partial copying of a practical assignment, report, or evaluation activity.
- Allowing other students to copy.
- Submitting a group project that has not been entirely prepared by its members.
- Presenting third-party materials as one's own (including translations or adaptations).
- Using communication devices (mobile phones, smartwatches, etc.) or communicating with other students during tests.
- Using materials not explicitly authorized during exams.
In these cases, the numerical grade on the transcript will be the lower value between 3.0 and the weighted average of the qualifications, meaning it will not be possible to pass by compensation. Automated code-copy detection tools will be used on all submissions.
Planning and Tool Usage
- Activity Planning
- Continuous evaluation dates and assignment submission deadlines will be published at the beginning of the course and may be modified due to unforeseen incidents. All changes will be formally communicated through the Caronte platform, the standard information channel for the course.
- Use of Artificial Intelligence (AI)
- The use of AI technologies is permitted exclusively as a support tool (information search, code interpretation, resolving conceptual doubts, etc.).
- It is strictly forbidden to use AI to develop the programming tasks that must be submitted. Any work that includes snippets of code or text generated by AI will be considered a breach of academic honesty, treated as an irregularity, and may lead to directly failing the course.
- Additional Considerations
- The following administrative procedures must be managed directly through the Academic Management (Gestión Académica) of the School of Engineering:
- Request for translation of evaluation materials into a language other than Catalan.
- Request for rescheduling evaluation tests.
- Application to opt for the single evaluation modality.
- The teaching staff does not have the authority to make decisions regarding these aspects and will limit themselves to applying the resolutions of the competent bodies of the School.
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)
Course groups and languages
The information provided is provisional until November 30. After this date, you will be able to consult the language of each group through this link. To access the information, you will need to enter the course CODE
| Type of teaching | Group | Language | Semester | Shift |
|---|---|---|---|---|
| (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 | second semester | afternoon |
| (PAUL) Classroom practices | 452 | Catalan/Spanish | second semester | afternoon |
| (PAUL) Classroom practices | 471 | Catalan/Spanish | second semester | afternoon |
| (PAUL) Classroom practices | 472 | Catalan/Spanish | second semester | afternoon |
| (PAUL) Classroom practices | 511 | Catalan/Spanish | second semester | morning-mixed |