ΕΠΛ133: Αντικειμενοστρεφής Προγραμματισμός

Πρόγραμμα Μαθημάτων

Πρόγραμμα Μαθημάτων »

Module 1: Overview of Java (Ανασκόπηση της Java).
Lecture 0: 16/1 Introduction to EPL133. Notes
Learning outcome:
  • Introduction to EPL133.
  • Introduction to Piazza.
  • EPL131 Refresh.
Readings:
Lecture 1: 19/1 Introduction to Object Oriented Programming. Notes
Learning outcome:
  • Introduction to EPL133
  • Object-oriented Programming: Introduction and History.
  • The Java programming language.
Readings:
  • Review EPL131 material.
  • Chapter 1. "Absolute Java", Walter Savitch.
Lab 1: 19/1 Java programming review.
Learning outcome: Review the process of compiling and executing Java programs. Design small Java classes.
Lecture 2: 23/1 Introduction to the Java programming platform. Problem definition. Well-defined problems.
Learning outcome: Become familiar with:
  • The Java platform.
  • Interpretation vs. Compilation of computer programs.
  • Τhe Java Virtual Machine (JVM) and Bytecodes.
  • The lifecycle of a Java program.
Readings: Chapter 1. "Absolute Java", Walter Savitch.
Precept: 23/1 Problem Solving
Learning outcome: Introduction to the concept of well-defined problems and proper problem definition.
Lab 2: 23/1 Style and comments. Javadoc.
Learning outcomes: Java coding standards and Javadoc style comments.
Module 2: Abstraction (Αφαιρετικότητα)
Lecture 3: 26/1 Problem Solving and Abstraction.
Learning outcomes: Understand the concept of abstraction, hierarchy and data abstraction. Understand how abstraction is used to manage complexity. Understand the concepts of objects and classes. Understand the notions of object properties (fields), object behaviors (methods), object id (handle),.
Readings: Chapter 4, Savitch.
Lab 3: 26/1 Hands-on Examples of using Abstraction in Problem Solving.
Learning outcome: Explore the use of abstraction in problem solving.
  • Design a class representing an n-sided regular polygon
  • Design a class for statistic calculations
Module 3: Class Design and Memory Allocation (Σχεδιασμός Κλάσεων. Διαχείριση Μνήμης).
Lecture 4: 30/1 Introduction to Java Class Design. Learning outcomes: Master the key concepts of abstraction in object-oriented programming and Java. Methods in Java, method parameters and arguments. Method invocation and call-by-value argument passing. The parameter "this". Readings:
  • Chapter 4. "Absolute Java", Walter Savitch.
Precept: 30/1 From Abstraction to Class Design.
Learning outcome: Explore abstractions and problem modelling for simulating a robot.
Lab 4: 30/1 Class design in Java.
Learning outcome: Explore examples of class definition in Java.
  • Design a class representing a circle.
  • Design a class representing a triangle.
  • The green mice. Create "mice" in different ways and make them "evolve" over time.
Lecture 5: 2/2 Memory Management in Java. Learning outcome: Memory Management Overview; understanding memory allocation, the organization of virtual memory, the concepts of stack, heap and static memory.
Readings:
Consultation: 2/2 Consultation hours on 1st homework.
Lecture 6: 6/2 Memory Management, Object Construction and Static Memory in Java. Learning outcome: Understand Java object construction and initialization. Method and constructor overloading. Understand the concept of static variables and static methods in Java.
Readings:
  • Chapters 5, 6. "Absolute Java", Walter Savitch.
  • Review recursion and stacks for recursion. Chapter 11. "Absolute Java", Walter Savitch.
Precept: 6/2 Overview of Garbage Collection
Learning outcome: Understand the concept of garbage collection. Garbage collection in Java and related methods. Algorithms for garbage collection.
Lab 5: 6/2 Exploring Memory Management in Java.
Learning outcome: Explore the memory allocation and garbage collection mechanisms of Java programs.
  • Using th VisualVM tool.
  • String Pool in Java
  • Calculating the size of objects in memory
Lecture 7: 9/2 Advanced Class Design in Java. Learning outcome: Review of Wrapper classes. References and class parameters. Using and misusing references. Introduction to Invariants. Understanding class invariants. Readings: Chapter 5. "Absolute Java", Walter Savitch.
Lab 6: 9/2 Garbage collector in Java.
Learning outcome: Explore the memory allocation and garbage collection mechanisms of Java programs.
  • Uniderstanding static and dynamic string concatenation in Java.
  • Garbage collector in use
  • Static Initialization Block
Lecture 8: 13/2 Advanced Class Design in Java. Learning outcome: Understand the notion of class invariants. Applying class invariants in constructors and methods. Expand on encapsulation and information hiding through copy constructors and the concept of privacy leakage, mutable and immutable classes. Readings: Chapter 5. "Absolute Java", Walter Savitch.
Precept: 13/2 Problem Solving
Learning outcome: Modeling problems as state-space transformation steps.
Lab 7: 13/2 JUnit Tests.
Learning outcome: Explore the JUnit testing platform.
  • Creating JUnit tests in Eclipse
  • Writing tests
  • Running your tests cases
Module 4: Object-Oriented Methodology (Αντικειμενοστρεφής Μεθοδολογία).
Lecture 9 : 16/2 Planning and Analysis Methodology. Learning outcome: Understand what Problem Formulation is. Introduction to Analysis Methodologies: Project Planning, Requirements Analysis, Specification, Development and Evolution, Testing. Overview of Object-Oriented Methodology. Introduction to CRC cards.
Readings:
  • Chapter 12. Absolute Java Walter Savitch.
  • Chapter 2. "Object-Oriented Design and Patterns", Cay Horstmann, Wiley, 2nd edition, 2006.
  • UML basics: The class diagram by IBM.
  • CRC Cards by Wikipedia.
Quiz 1: 16/2 Quiz 1.
Lecture 10: 20/2 The Object-Oriented Design process. Learning outcome: Design with Class-Responsibilities-Collaborators cards. Introduction to UML, Class diagrams, Sequence and State Diagrams.
Readings:
  • Chapter 12. Absolute Java Walter Savitch.
  • Chapter 2. "Object-Oriented Design and Patterns", Cay Horstmann, Wiley, 2nd edition, 2006.
  • UML basics: The class diagram by IBM.
  • CRC Cards by Wikipedia.
Precept: 20/2 Problem Solving
Learning outcome: Translating a problem into a design, using CRC cards and UML: the case of a telephone mailbox.
Lab 8: 20/2 Lab8.
Learning outcome: File organising in a Java project.
  • Classpath
  • Git and github
Lab 9: 23/2 UML diagrams.
Learning outcome: Design UML class diagrams. Design UML use case diagrams
Module 5: Inheritance (Κληρονομικότητα).
Lecture 11: 23/2 Inheritance. Learning outcome: Introduction to class re-use through composition and inheritance. Introduction to inheritance as an abstraction and programming technique. Develop an understanding of the relation between inheritance and class hierarchy.
Readings: Chapter 7. Absolute Java Walter Savitch.
Precept: 27/2 Problem Solving
Learning outcome: Review of inheritance with examples and UML.
Lecture 12: 27/2 Inheritance continued.
Learning outcome: In depth review of inheritance mechanisms. Method Overriding. Explore how object construction works in the case of inherited classes. Final classes.
Readings: Chapter 7. Absolute Java Walter Savitch.
Lab 10: 27/2 Inheritance in Java.
Learning outcome: Introducing inheritance in Java.
  • How super(), this() works.
  • The equals() method and inheritance.
Lecture 13: 2/3 Upcasting.
Learning outcome: In depth review of upcasting and its implications. Review of examples with inheritance and upcasting. The "Object" class. Code re-use through composition and delegation.
Readings: Chapter 7. Absolute Java Walter Savitch.
Lab 11: 2/3 Inheritance in Java - continued.
Learning outcome: Solve different problems using inheritance in Java.
Module 6: Polymorphism (Πολυμορφισμός).
Lecture 14 and Precept: 6/3 Polymorphism. Learning outcome: Introduction to the concept of binding. In depth understanding of polymorphism.
Readings: Chapter 8. Absolute Java Walter Savitch.
Lab 12: 6/3 Polymorphism in Java.
Learning outcome: Polymorphic behavior via method overriding.
Lecture 15: 9/3 Polymorphism - continued. Learning outcome: Polymorphism and Static methods: Overriding vs. Hiding. Polymorphism and Constructors. Pitfalls of upcasting vs. downcasting.
Readings: Chapter 8. Absolute Java Walter Savitch.
Lab 13: 9/3 Polymorphism in Java.
Learning outcome: Polymorphic behavior via abstract classes. Polymorphic copy.
Precept: 13/3 Abstract Classes
Learning outcome: Introduction to Abstract Classes.
Readings: Chapter 8.2 Absolute Java Walter Savitch.
Module 7: Exception Handling and File I/O (Διαχείριση Εξαιρέσεων και Είσοδος/'Εξοδος σε Αρχεία).
Lecture 16: 13/3 Exception Handling. Learning outcome: Understand the concept of exceptions and faults. Introduction to exception handling in Java.
Readings: Chapter 9. Absolute Java Walter Savitch.
Lab 14: 13/3 Exercises on Polymorphism in Java.
Learning outcome: Polymorphic behavior .
Midterm: 16/3
Precept: 20/3 Programming Exceptions
Learning outcome: Programming Techniques for Exception Handling.
Readings: Chapter 9.2, 9.3 Absolute Java Walter Savitch.
Lecture 17: 20/3 File I/O. Learning outcome: Introduction to File I/O. Streams. Text Files.
Readings: Chapter 10.1, 10.2 Absolute Java Walter Savitch.
Lab 15: 20/3 Exceptions in Java.
Learning outcome: Using exceptions, make your own exception classes.
Lecture 18: 23/3 File I/O. Learning outcome: Bufferred Reader. The File Class. Binary Files.
Readings: Chapter 10.3, 10.4Absolute Java Walter Savitch.
Lab 16: 23/3 Exercises on File I/O.
Learning outcome: Using streams in Java. Byte Streams, Character Streams.
Precept: 27/3 Overview of Binary Files and Random Access to Binary Files
Learning outcome: Binary files (ctd'). Writing objects to secondary storage. Random access to binary files.
Readings: Chapter 10.4, 10.5 Absolute Java Walter Savitch.
Module 8: Interfaces, Inner Classes and Generics (Διαπροσωπείες, Εσωτερικές Κλάσεις, Γενικευμένοι Τύποι).
Lecture 19: 27/3 Interfaces. Learning outcome: Introduction to Interfaces.
Readings: Chapter 13.1Absolute Java Walter Savitch.
Lab 17: 27/3 Exercises Interfaces.
Learning outcome: Using interfaces in Java.
  • Interfaces and inheritance.
  • Modelising geometric shapes using interfaces.
  • Example using Comparable interface.
Lecture 20: 30/3 Interfaces and Design Patterns. Learning outcome: Evolving Interfaces. Overview of software design patterns. The Model-View-Controller pattern.
Readings: Chapter 13.1, 12.2 Absolute Java Walter Savitch.
Lab 18: 30/3 Exercises Interfaces.
Learning outcome: Using interfaces in Java.
  • More exercises on interfaces in Java.
  • Modelising shapes using interfaces - continued
Precept: 17/4 Midterm Exam review
Learning outcome: Review the midterm problems and discuss solutions.
Lecture 21: 17/4 Inner Classes. Learning outcome: Introduction to Inner Classes. Understand syntax and basic uses. Review of simple examples of inner-class use.
Readings: Chapter 13.2, 13.3 Absolute Java Walter Savitch.
Lab 19: 17/4 Exercises on Inner classes and SOLID design principles.
Learning outcome: Using inner classes in Java.
  • The Liskov Substitution Principle.
  • The Interface Segregation Principle.
Lecture 22: 20/4 Inner Classes and Closures. Learning outcome: More about Inner Classes. Understand the concepts of nesting inner classes, local inner classes and anonymous classes.
Readings: Chapter 13.3 Absolute Java Walter Savitch, and class-notes.
Lab 20: 20/4 Exercises on Collections.
Learning outcome: Using collections in Java.
  • Using HashMaps.
  • Using HashSets.
Precept: 24/4 Putting Inner Classes to work: Closures, Callbacks and Application Frameworks
Learning outcome: Introduction to closures and call-backs. Understand how inner classes provide a mechanism for implementing callbacks in Java. Learn how to use inner classes in popular design patterns. Introduction to the concept of Application Frameworks with Examples.
Readings: Read Chapter 11 Thinking in Java, 4th Edition Bruce Eckel to see more details on closures, callbacks, application frameworks and control frameworks, as well as examples discussed in class.
Lecture 23: 24/4 Generics. Learning outcome: Introduction to generics. Overview of ArrayList.
Readings: Chapter 14 Absolute Java Walter Savitch, and class-notes.
Lab 21: 24/4 Exercises on Generics.
Learning outcome: Implement generic classes in Java.
Quiz 2: 27/3 Quiz 2.
Lecture 24: 4/5 Generics. Learning outcome: Generic classes and generic methods.
Readings: Chapter 14 Absolute Java Walter Savitch, and class-notes.