OBJECT ORIENTED PROGRAMMING-1
- Academic year
- 2025/2026 Syllabus of previous years
- Official course title
- OBJECT ORIENTED PROGRAMMING-1
- Course code
- CT0669 (AF:521653 AR:334743)
- Teaching language
- English
- Modality
- On campus classes
- ECTS credits
- 6 out of 9 of OBJECT ORIENTED PROGRAMMING
- Degree level
- Bachelor's Degree Programme
- Academic Discipline
- INF/01
- Period
- 1st Semester
- Course year
- 2
- Where
- VENEZIA
- Moodle
- Go to Moodle page
Contribution of the course to the overall degree programme goals
Expected learning outcomes
__________________________
Upon successful completion of this course, the student will have acquired the following:
* Fundamental Object-Oriented Concepts
- The OOP Paradigm: Clearly explain the principles and benefits of the object-oriented paradigm compared to procedural programming.
- Core Principles: Define and describe the four pillars of OOP: encapsulation, inheritance, polymorphism, and abstraction.
- Object Relationships: Understand the fundamental design concepts of composition ("has-a") and inheritance ("is-a") and recognize their appropriate use.
* The Java Language and Platform
- Java Architecture: Describe the roles of the JVM, JRE, and JDK in the Java ecosystem and understand the principle of platform independence.
- Memory Management: Understand the concept of automatic garbage collection and its implications for software development.
- Standard Library: Recognize the purpose and structure of key components of the Java Collections Framework (e.g., List, Set, Map) and I/O streams.
- Language Features: Explain the use of interfaces, abstract classes, and Java's exception handling model (checked vs. unchecked exceptions).
* The C++ Language and Systems
- Memory and Performance: Understand the C++ memory model, the concept of object lifetime, and the principle of RAII for managing resources.
- Modern C++ Idioms: Explain the purpose and function of smart pointers (std::unique_ptr, std::shared_ptr) as a mechanism for safe memory management.
- Generic Programming: Understand how templates are used to implement generic, type-safe classes and functions.
- Polymorphism Mechanism: Describe the role of virtual functions and v-tables in enabling dynamic polymorphism in C++.
* Comparative Analysis
- Paradigm Implementation: Compare and contrast how core OOP concepts are implemented differently in Java versus C++.
- Language Trade-offs: Understand the fundamental trade-offs between the two languages.
Ability to Apply Knowledge and Understanding
__________________________
Upon successful completion of this course, the student will be able to:
* General Object-Oriented Design and Implementation
- Model and Design: Translate real-world problems into object-oriented models, identifying appropriate classes, attributes, and methods.
- Implement Core Principles: Develop software that correctly applies the principles of encapsulation, inheritance, and composition.
- Apply Polymorphism: Implement polymorphic behavior using abstract classes, interfaces (in Java), or virtual functions (in C++) to create flexible and extensible code.
- Build Data Structures: Implement fundamental generic data structures (e.g., linked lists, stacks) using an object-oriented approach.
* Application in the Java Language
- Develop Java Applications: Write, compile, debug, and run complete Java applications that solve defined problems.
- Use the Standard Library: Apply the Java Collections Framework to efficiently store and process data.
- Handle Errors: Implement robust error handling using Java's exception handling mechanism.
- Create GUIs: Develop basic graphical user interfaces (GUIs) with event handling using JavaFX.
* Application in the C++ Language
- Write Modern C++ Code: Develop C++ programs using modern features, including the Standard Template Library (STL).
- Manage Resources Safely: Apply the RAII idiom by correctly using smart pointers (std::unique_ptr, std::shared_ptr) to manage memory and other resources.
- Implement Generic Code: Use class templates to write reusable, type-safe C++ components.
- Overload Operators: Apply operator overloading to make custom classes more intuitive and user-friendly.
Pre-requirements
* Formal Prerequisite:
- Successful completion of a university-level introductory programming course taught in a procdural programming language.
* Conceptual Knowledge:
- Procedural Programming: A strong understanding of how to structure programs using functions.
- Fundamental Syntax: Proficiency with variables, data types (e.g., int, char, float), operators, and expressions.
- Control Flow: Mastery of control statements, including if-else, switch, for loops, and while loops.
- Functions: The ability to define and call functions, pass parameters (pass-by-value), and handle return values.
- Memory Concepts: A solid understanding of pointers, memory addresses, and the principles of manual memory allocation (e.g., malloc, free).
- Basic Data Structures: Familiarity with arrays and C-style strings (char arrays).
* Practical Skills:
- Development Environment: Experience writing, compiling, linking, and executing programs from a command-line interface.
- Problem-Solving: The ability to translate a problem description into a working, procedural algorithm.
- Debugging: Basic skills in debugging code, such as using print statements to trace program flow and inspect variable values.
Contents
1) JVM & platform independence. Anatomy of a Java app. Compiling & running. Basic I/O with Scanner.
2) Classes: Shift from procedural to objects. Defining simple classes with methods.
3) Methods: Method overloading. static methods and variables. Quick syntax review of control statements.
4) Arrays & ArrayList: Java arrays as objects with a length property. Intro to the generic collection as an alternative.
5) Classes: Encapsulation with public/private. Getters and setters. The this reference. Constructors and overloading.
6) Composition: Modeling "has-a" relationships between objects. Other objects as class members.
7) Inheritance: Code reuse via "is-a" relationships. Superclasses and subclasses. Protected members.
8) Inheritance: Super keyword for superclass members access. Chain of constructor calls in inheritance.
9) Polymorphism: Programming to an interface, not an implementation. Method overriding.
10) Polymorphism: Defining abstract classes and methods. Using final to prevent overriding or inheritance.
11) Interfaces: Defining and implementing interfaces for pure abstraction. Multiple inheritance of type.
12) Exception Handling: Modern error handling with try, catch, and finally blocks. Checked vs. unchecked exceptions.
13) Java Collections Framework: Overview. List, Set, and Map interfaces and implementations.
14) Generics: Understanding the motivation for generics for type safety. Creating and using your own generics.
15) GUI: Introduction to event-driven programming. JavaFX layouts and basic UI controls.
16) GUI: Handling user interaction with events and listeners in JavaFX. Building a responsive GUI.
17) Lambdas & Streams: Functional programming in Java. Lambda expressions and the Stream API.
18) I/O & Serialization: Reading/writing files using I/O streams. Object Serialization.
19) Data Structures: Applying OOP and generics to build robust data structures. Implementing a generic Linked List.
20) Data Structures: Continuing with custom data structures. Implementing a generic Stack and a generic Queue.
21) Searching, Sorting, & Big O: Using Comparable and Comparator interfaces for custom sorting.
22) Concurrency: Multithreading. Creating threads using the Thread class and the Runnable interface.
23) Concurrency: Managing shared resources and preventing race conditions. Synchronized keyword.
24) Final Review: Comprehensive review of key OOP concepts.
Mod 2: OOP with C++
25) C++ as a "Better C": Exploring iostream, namespaces, and the std::string class. Function overloading and pass-by-reference (&).
26) Intro to the STL: Philosophy of the Standard Template Library. Using std::vector instead of C-style arrays. Iterators.
27) Modern C++: The RAII idiom. Avoiding raw new/delete. Using smart pointers
28) C++ Classes & Objects: class vs. struct. Constructor initializer lists and destructors. Const correctness.
29) Inheritance in C++: Public, protected, and private inheritance. Constructor/destructor order. Multiple inheritance.
30) Polymorphism in C++: Using the virtual keyword for dynamic dispatch. Abstract base classes with pure virtual functions.
31) Operator Overloading: Making custom classes behave like built-in types by overloading operators.
32) C++ Exception Handling: Using try, throw, and catch. Discussing RAII's role in creating exception-safe code.
33) Class Templates: Writing generic, type-safe classes like a Stack<T>. Contrasting C++ templates with Java.
34) More STL: Exploring other key containers like std::map. Using the powerful algorithms from the <algorithm> header.
35) C++ vs. Java Comparison: Comparing key differences: GC vs. RAII, JVM vs. native, multiple inheritance vs. interfaces.
36) Review of C++ topics. Modern features like range-based for, auto, and lambdas.
Referral texts
__________________________
* Deitel, Paul J., and Harvey M. Deitel. Java How to Program, Early Objects. 11th ed., Pearson Education, Inc., 2018.
Mod 2: OOP with C++
__________________________
* Deitel, Paul J., and Harvey M. Deitel. C++ How to Program. 11th ed., Pearson Education, Inc., 2020.
Assessment methods
__________________________
The final grade is determined exclusively by a single, comprehensive written examination. The exam is designed to assess the student's theoretical understanding of the object-oriented paradigm and their practical ability to apply this knowledge through Java programming.
While the practical exercises are in Java, the theoretical questions will draw upon the full scope of the course. This includes the comparative insights and deeper understanding of memory management and templates gained from the C++ module.
The total duration for the exam will be 90 minutes. The students must submit the answers to the theoretical questions within 30 minutes from the start of the exam and the whole exam must be submitted within 90 minutes overall (i.e. if the student submits the theoretical questions in advance, he/she will have more time available for the exercise).
Description of Exam Components
__________________________
The exam is divided into two distinct parts:
* Part A: Theoretical Questions
This section evaluates the student's knowledge and understanding of core OOP concepts. It consists of three open-ended questions designed to test comprehension of fundamental principles. Students will be expected to provide clear, precise, and well-justified answers.
Topics may include: The four pillars of OOP (encapsulation, inheritance, polymorphism, abstraction), design principles (composition vs. inheritance), abstract classes vs. interfaces, memory management concepts (e.g., garbage collection vs. RAII/smart pointers), and the mechanisms behind polymorphism.
This part is "closed book". This means that the student cannot access any written or digital support material.
* Part B: Practical Exercises
This section evaluates the student's ability to apply OOP principles to solve problems using the Java language. It will consist of one or more programming exercises.
Tasks may include: Implementing a set of interacting classes based on a given specification. Completing or extending existing Java code to add functionality. Applying concepts like inheritance, polymorphism, and interfaces to design a practical solution.
This part is "open book". This means that the student can access any written support material (e.g. personal books or lecture notes). Digital devices are not allowed.
Type of exam
Grading scale
__________________________
The final grade is calculated on a scale of 30 points, with a minimum of 18/30 required to pass the exam. The total score is a sum of the points awarded in each part:
* Part A (Theoretical): Up to 12 points (4 points per question):
- 4 Points: The answer is perfectly correct and complete, demonstrating deep insight by comparing and contrasting related concepts.
- 3 Points: The answer is factually correct and addresses all parts of the question with relevant examples to show solid understanding.
- 2 Points: The answer provides a correct but basic definition, demonstrating a foundational understanding that lacks necessary detail.
- 1 Point: The answer attempts to address the question but is largely incorrect, incomplete, or reveals a fundamental misunderstanding.
- 0 Points: The question is left unanswered or the response is completely irrelevant.
* Part B (Practical): Up to 20 points:
- 16-20 Points (Excellent): The solution is functionally correct, demonstrates an excellent application of OOP principles, and is written with high-quality, readable code.
- 11-15 Points (Good): The solution is largely correct and applies OOP principles appropriately, but contains minor logical flaws or inconsistencies in its design and code quality.
- 6-10 Points (Sufficient): The solution is only partially functional or demonstrates a flawed and basic application of object-oriented design, just meeting the minimum requirements.
- 0-5 Points (Insufficient): The solution fails to compile, is functionally incorrect, or completely ignores the required object-oriented approach.
* The final grade will be assigned based on the total score achieved:
- 18 - 20: Sufficient. The student demonstrates a basic grasp of the core concepts but may have notable errors in theory or implementation.
- 21 - 23: Fair. The student shows a decent understanding of OOP principles with a generally functional but imperfect practical application.
- 24 - 26: Good. The student has a solid command of the course material and can apply it correctly with only minor errors.
- 27 - 29: Very Good. The student displays a deep understanding of the paradigm and strong programming skills.
- 30 - 32: Excellent. The student's knowledge is thorough, and the practical application is correct and well-designed.
Criteria for "Cum Laude" (Honors)
__________________________
The distinction of cum laude is reserved for students whose performance is not just excellent but truly exceptional. To be awarded cum laude, the following conditions must be met:
* Perfect Score: The student must first achieve the maximum score of 30/30.
* Exceptional Quality: In addition to the perfect score, the exam must demonstrate:
- In the theoretical part, a deep and critical insight into the OOP paradigm, with answers that are exceptionally clear, precise, and connect concepts from both the Java and C++ modules.
- In the practical part, a solution that is not only correct but also elegant, efficient, and exemplary in its use of object-oriented design patterns. The code demonstrates a maturity that significantly exceeds the standard expectations.
Essentially, laude is awarded when the student's work is flawless and exhibits a level of mastery that is clearly beyond the scope of a standard "excellent" grade.
Teaching methods
* The primary mode of instruction will be formal lectures that blend theoretical concepts with practical application. Each lecture is designed to be an interactive session rather than a passive presentation.
- Conceptual Explanation: Key theoretical concepts (e.g., polymorphism, encapsulation, RAII) will be introduced using slides, diagrams, and illustrative examples to build a strong foundational knowledge.
- Live Coding Demonstrations: A significant portion of lecture time will be dedicated to live coding. The instructor will write, compile, and debug code in real-time to demonstrate how theoretical concepts are translated into working Java and C++ programs. This provides a practical, step-by-step view of the development process.
- Student Interaction: Students are encouraged to ask questions and participate in discussions throughout the lectures to clarify concepts and explore alternative solutions.
* To support learning outside the classroom, a comprehensive set of resources will be made available to all students.
- Primary Textbooks: The two specified textbooks ("Java How to Program" and "C++ How to Program") will serve as the core reference materials for the course.
- Digital Materials: All lecture slides and the complete source code written during the live demonstrations will be made available online through the Moodle portal.
- Asynchronous Support: A dedicated online forum will be available for students to ask questions and discuss course topics with the instructor and their peers.
Further information
__________________________
* While you are free to use any tools you are comfortable with, we highly recommend setting up a proper development environment early in the course.
- For Java: You will need the Java Development Kit (JDK), preferably a Long-Term Support (LTS) version. For an Integrated Development Environment (IDE), we recommend IntelliJ IDEA Community Edition or Eclipse.
- For C++: You will need a modern C++ compiler like G++ (part of GCC) or Clang. A great, cross-platform IDE is Visual Studio Code with the C/C++ extension pack.
Learning to use an IDE and its integrated debugger will be invaluable.
Advice for Success
__________________________
- Don't Fall Behind: The course is cumulative. Concepts from the first week are essential for understanding topics in the last week. Keep up with lectures and exercises consistently.
- Code Every Day: Programming is a practical skill. A small amount of practice every day is more effective than a single, long session once a week.
- Embrace the Paradigm Shift: The biggest challenge in this course is moving from a procedural (C-style) mindset to an object-oriented one. Focus on thinking in terms of objects, classes, and their interactions.
- Learn Your Debugger: Using a debugger is the most efficient way to understand your code's behavior and find errors. Relying only on print statements will not be sufficient for complex problems.
Academic Integrity
__________________________
All students are expected to adhere to the university's code of academic integrity. In the context of this course, all submitted code for the final exam must be entirely your own work. You are encouraged to discuss concepts and problem-solving strategies with your peers, but sharing or copying code is a serious academic offense. Any violation will result in a failing grade (0/30) for the exam and will be reported to the appropriate university authorities for further disciplinary action.