Object Oriented Programming (B-KUL-H02C5A)
Aims
In-depth study of a structured and disciplined approach to develop medium-sized, sequential software systems using the paradigm of object oriented programming.
- Students learn how to draw an adequate design for a software system in terms of classes, associations and inheritance.
- They know how to write proper documentation for classes and their ingredients, both in a natural language and in a simple formal language.
- They can work out a proper implementation that satisfies quality criteria such as correctness, adaptability, re-usability and efficiency.
- They know how to verify the correctness of software systems by means of a set of well chosen tests.
Previous knowledge
Students must have a basic knowledge in programming. They must know concepts such as variables, routines, arguments, conditional statements and iterative statements. They must know how to use these concepts in working out simple algorithms in a programming language such as C, C++ or Java. Students can learn these concepts among others in the course on “Introduction to Programming Programming” (I0D41A).
Is included in these courses of study
- Master of Geography (Programme for students started before 2021-2022) (Leuven et al) (GIS AND SPATIAL MODELLING) 120 ects.
- Master in de ingenieurswetenschappen: biomedische technologie (Leuven) 120 ects.
- Master of Bioinformatics (Leuven) 120 ects.
- Master in de bio-informatica (Leuven) 120 ects.
- Master of Information Management (Leuven) 60 ects.
- Courses for Exchange Students Faculty of Bioscience Engineering (Leuven)
- Master of Mobility and Supply Chain Engineering (Leuven) 120 ects.
- Master of Biomedical Engineering (Programme for students started in 2021-2022 or later) (Leuven) (Option: Bio-Informatics and AI) 120 ects.
- Master of Geography (Programme for students started in 2021-2022 or later) (Leuven et al) 120 ects.
Activities
2 ects. Object Oriented Programming: Project (B-KUL-H00H8a)
Content
The course is complemented with a project that also serves to evaluate students. The assignment for the project is supplied in 2 or 3 successive steps. The project may be worked out individually or in teams of 2 students. The project assignment will involve the development of standalone classes, a hierarchy of classes and possibly a graph abstraction.
2 ects. Object Oriented Programming: Lecture (B-KUL-H02C5a)
Content
The course discusses the object oriented paradigm to develop software systems. It uses Java as a programming language and UML (Unified Modeling Language) as a design notation. In documenting classes, some dialect of first-order logic is used to specify certain aspects in a formal way.
1. Classes
The first part of the course discusses the definition of a standalone class. The full life cycle including the specification or documentation, the implementation and the verification of a class is covered. Another important topic are the paradigms of defensive programming and of contractual programming as alternative strategies to deal with exceptional cases. Important concepts in the study are preconditions, postcondtions, class invariants, exceptions, and black-box testing. Attention is also paid to representation encapsulation and the dangers of exposing representation objects.
2. Inheritance
The second part of the course focuses on the development of hierarchies of classes. This part studies abstract superclasses as a mechanism for generalizing over a set of concrete classes. It complements that study with polymorphism and dynamic binding, and shows how these concepts contribute to the adaptability and re-usability of software systems. The part also includes an in-depth study of behavioral subtyping, and an introduction to implementation inheritance, interfaces, and the Java Collections Framework.
3. Entity-relationship abstractions
Very often, computer programs need to process data in the form of a graph: a set of entities with relationships and attributes. In an object-oriented program, such a graph is typically represented by means of a group of objects linked using bidirectional associations. The final part of the course studies single-class and multi-class entity-relationship abstractions, as well as encapsulating multi-class abstractions by means of packages.
Course material
- Handbook: new course text by professor Jacobs (in use since 2019-2020)
- Toledo: Solutions of exercises, links to software and additional literature, project assignment, ...
Format: more information
Each lecture covers a chapter from the course book. Students are asked to read the chapter in advance. The lecture consists in interactively solving an exercise that covers all the important aspects of the chapter at stake. At the same time, important concepts are briefly explained. At the end of the session, a possible solution is published on Toledo.
Evaluation
Evaluation: Object Oriented Programming (B-KUL-H22C5a)
Explanation
Students must develop a project, either on their own or in cooperation with another student. The assignment for that project is supplied in two or three successive steps during the semester. Students will receive the next part of the assignment after the deadline for submitting their solution for the previous part.
The result for the project is determined as the weighted average of the results for the three parts, with weights that will be announced via Toledo.
Furthermore, there will be a closed-book written exam (on a PC) during the exam period. During this exam, the student's knowledge of, insight in, and ability to apply the concepts and principles of the course will be examined by means of various types of questions, potentially including (but not limited to):
- fill-in-the-blanks terminology questions
- programming tasks where the student must develop a piece of Java code with accompanying formal documentation and a test suite in Eclipse with the FSC4J plugin on a PC in a PC room
The result for the course (before rounding) is the average of the result for the project and the result for the written exam, except if the student's result for the project is below 8/20 or their result for the written exam is below 10/20, or both; in the latter case, the result for the course (before rounding) is the minimum of the result for the project and the result for the written exam. This means that the result for the course (before rounding) can be >= 10/20 only if the result for the project is >= 8/20 and the result for the written exam is >= 10/20. (Note: rounding is applied to the result for the course only; no rounding is applied to partial results.)
Information about retaking exams
Students who did not pass the course in June can retake the project, the written exam, or both.
For students who retake the project, a new assignment is released after the June exams, with a deadline before the September exam period. The result for the retake project completely replaces the earlier result for the project, even if it is worse.
The result for the retake written exam completely replaces the earlier result for the written exam, unless it is worse.
The result for the course is computed from the result for the project and the result for the written exam exactly like in June.
Note: students must enroll for the retake exams, even if they wish to retake only the project.