Object Oriented Programming

Objectives

Knowledge:

  • Object-­Oriented Programming (OOP) concepts, namely classes, interfaces, polymorphism and inheritance.
  • Techniques and algorithms for processing data structures such as lists, strings, vectors, dictionaries, and sets.
  • Basic mechanisms of generic programming.
  • Class libraries and learn how to reuse them.
  • Basic Software Engineering concepts, from a developer perspetive, such as software quality, reuse, development and maintenance costs, or implementation efficiency.

Application:

  • Design and develop software applications using OOP.
  • Problem solving with OOP.
  • Using verification and validation techniques.
  • Increasingly autonomous software development skills, both in solo and as a team member.

Soft­-Skills:

  • Build up an interest for programming and solving problems.

General characterization

Code

11153

Credits

9.0

Responsible teacher

Maria Armanda Simenta Rodrigues Grueau, Miguel Carlos Pacheco Afonso Goulão

Hours

Weekly - 5

Total - 70

Teaching language

Português

Prerequisites

Students should acquire the knowledge from Introduction to Programming.

Bibliography

1. Cay Horstmann, Core Java, Volume I: Fundamentals (Oracle Press for Java) 13th Edition, 2024.

2. F. Mário Martins, Java 8 - POO + Construções Funcionais, FCA, 2017.

3. Slides de Programação Orientada pelos Objectos (disponibilizados gradualmente na página moodle)

4. David J. Eck, Introduction to Programming Using Java, version 9, 2022.

Teaching method

Lectures consist on a theoretical exposition, illustrated by application examples, and supported by slides and the usage of the software development environment of the lecturer.
In the lab sessions, students solve problems by concretely applying the concepts discussed in the previous lectures.
Students may clarify any doubts during classes or in the instructor’s contact hours.

Evaluation method

Evaluation components:
There are three components in the assessment: the theoretical component (NT), the practical component (NP) and the lab participation component (NL). The final grade (NF) is calculated by the formula:

NF = 0.65 * NT + 0.3 * NP + 0.05 * NL

NF is rounded to units. All the intermediate grades are rounded to one decimal place.

Theoretical component (NT):
This assessment component consists of 2 tests or an exam. The tests and the exam are face-to-face, closed-book, written, and individual. In the assessment by tests, the grade for this component is calculated as follows:

NT = 0.3 * NT1 + 0.7 * NT2

where:

- NT1 is the grade of test 1;
- NT2 is the grade of test 2;

If the exam is carried out, the NT grade is the grade obtained in the exam.

Practical component (NP):
This assessment component consists of 2 programming project assignments to be carried out in groups of 2 students during the semester.

Discussions are mandatory, in-person, and individual. The discussion of a programming project consists of making changes to the delivered code so that the new program solves a variant of the functionalities'' of the original problem, defined in the discussion statement. The discussion grades and their criteria are the following:

20: the change is generally correct;
16: the change is confusing or very incomplete, but the direction taken is not wrong;
12: the change is not correct, with "some things done well and others very poorly";
4: no change was made, or the changes made are minor (e.g., only changing the input reading), or the changes made do not make sense.
In general, the student''s grade in a programming project is the minimum between the grade of the delivered programming project (carried out in a team) and their grade in the discussion of that programming project (which is zero if the student was absent). Consequently, the grades of the two team members may differ (ranging from 0 to the grade of the programming project).

The grade for the practical component is calculated as follows:

NP = (1/3) * NP1 + (2/3) * NP2

where:
- NP1 is the grade of the student for programming project 1;
- NP2 is the grade of the student for programming project 2.

Lab participation component (NL):

This component is earned through mini-projects that will be proposed throughout the semester.

Attendance requirement (in Portuguese "Frequência"):
A student with a grade greater than or equal to 9.5 in the practical component obtains attendance in the course (NP >= 9.5). A student who has not achieved the attendance requirement is excluded from the appeal exam in that academic year.

Final grade:
A student with attendance obtains approval if both the NF and NT grades are greater than or equal to 9.5.

Attendance of the previous academic year:
Students who have obtained the attendance requirement in the previous academic year, keep it this year. If they submit any of the projects  this year, they will lose the automatic attendance provided from last year. In that case, they will have to deliver both pratical projects, to be eligible for obtaining the attendance requirement again.

Fraud and Plagiarism:
Issues of fraud and plagiarism will be dealt with following the FCT NOVA Knowledge Assessment Regulation.

Students are allowed to talk to their colleagues about the programming projects and discuss solutions, but they are prohibited from sharing code (even only "a few lines") under any circumstances, whether orally or in writing. Writing code must be an internal task within each team. For example, displaying code on the screen, dictating code, sending files with code, or placing them on sites accessible to third parties is not permitted. It is considered that:

- a team that gives or receives code is committing fraud;
- a team in which only one member is working is committing fraud;
- students who collaborate in larger groups, sharing code, are committing fraud.
-The use of AI tools (such as ChatGPT or Copilot) must be explicitly mentioned in the code. A team that uses these tools while carrying out a programming project and omits their usage is considered to be committing plagiarism.

Notes:
Grades relating to tests and practical assignments are rounded to one decimal place.

The usage of electronic devices is not allowed on tests and exams. Both tests and exams are closed-book.

During an assessment, a student may not have any electronic devices capable of accessing the internet or with Bluetooth connectivity (e.g., smartphones, smartwatches, smartglasses, tablets, laptops) with them, even if they are turned off. Violation of this rule results in immediate failure of the curricular unit by exclusion and will be reported to the Scientific Committee of the respective program.

It is each student''s responsibility to ensure they do not have any of these devices with them, either by not bringing them into the exam room or by leaving them, turned off, next to the board.

Subject matter

1. Interface specification and documentation
2. Software design with classes
3. Interface polymorphism
4. Class inheritance
5. Inheritance polymorphism
6. Assertions
7. Unit and regression testing
8. Exception handling
9. Generic programming
10. Usage of collection generic types

Programs

Programs where the course is taught: