Course program
Syllabus:
- Introduction to object oriented programming
- Hello, World! The REPL in Java 9
- Types of fundamental data
- Introduction to JRE, JDK and Eclipse
- Type conversions
- Fundamental concepts of object-oriented programming
- Encapsulation and default initialisation
- The String class
- References to objects, heaps & stacks, static methods
- Control structures; iterative constructs
- Iteration; array
- Constants and enumerations
- Inheritance, classes and abstract methods. The keywords this and super in constructors
- Overloading and overriding. Visibility: public, private, protected and default.
- Inheritance vs. composition.
- Polymorphism. Downcasting and upcasting.
- The Object class
- The final keyword.
- Interfaces. Differences with abstract classes. Multiple inheritance. Notable interfaces.
- Functional programming: functional interfaces and lambda expressions. References to methods.
- Stream and lambda expressions.
- Top-level classes, static and internal nested
- Introduction to Java 9 modularization
- Exceptions: try-catch-finally. Catch-or-declare policy. Throw and throws keywords. The Throwable, Exception and Error classes. Checked and unchecked exceptions.
- Collections: hierarchy, fundamental classes and their methods. Three ways to iterate over a collection. Iterable and Iterator. Comparable interface. Sorting with Comparable and Comparator
- Collections: sets and maps without sorting, with natural sorting and with insertion sorting. Methods. Arrays and Collections classes. The Stack stack class and the Queue queue interface.
- Implementation through LinkedList
- Input / Output
- Recursion in Java. Use of overloading.
- Equality in Java.
- Generic types.
- Design pattern: strategy, observer, factory, decorator, callback, MVC.
- Reflection. The Class class.
Prerequisites
Familiarity with basic programming concepts, such as those covered in a 1000-level programming course.
Books
The course page will make available all the necessary teaching material (recordings, slides, and excercise books). However, it is advisable to refer to at least one of the recommended texts [1, 2, 3].
Frequency
Synchronous participation in course activities is not mandatory but advisable.
Exam mode
The examination consists of a written test, an oral test and a project:
Written test: to be conducted beginning in the summer session.
Project: project specifications will be made available during the course. In case the project allows group performance, the project can be done individually or, if the project allows, by a group of at most 2 students. Passing the project requires, in addition to the delivery of what is required by the specifications, an individual discussion of the project. The project can be handed in 5 days before the date of the WRITTEN exam that is to be taken. The grade for the project depends on both the material handed in and the oral discussion. If there are significant indications that the handed-in project was copied in whole or in part, the project is considered void for all students involved, including those who allowed copying.
Oral test: to be taken after passing both the written test and turning in the project. The objective of the oral test is both to test the knowledge acquired in the course and to discuss the submitted project with the lecturer.
The exam is considered successfully passed if a passing grade (i.e. 18/30) is obtained in both the written test and the project. The final grade is obtained by calculating the weighted average of the grades obtained: 60% written test and 40% project. The two tests can be passed independently (i.e. on different dates) and in any order. However, the validity of the grades obtained in the two tests ends with the last session of the academic year (i.e. by the January-February session of the following year or, in the case of working/out-of-course students, etc., in the March-April session). Reservation on Infostud is required for taking the written test or the oral test (final verbalization); otherwise, verbalization will be postponed to the next session.
Bibliography
[1] Claudio De Sio Cesari. Manuale di Java 9 - Programmazione orientata agli oggetti con Java standard edition 8 Hoepli, 2018.[2] Herbert Schildt. Java: The Complete Reference, eleventh edition. Mcgraw-Hill Osborne Media, 2018.[3] Cay S. Horstmann. Concetti di informatica e fondamenti di Java. Apogeo, 7a edizione, 2019.