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

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

Πρόγραμμα Μαθημάτων και Μαθησιακοί Στόχοι »

Module 1: Introduction to Object-Orientation.
Lecture 1: 19/1 Course Overview and Java Programming Review. Notes
Learning Objectives:
  • Understand how to study and succeed in EPL133.
  • Master the tools used to find information about lecture and lab plans, reading material, learning objectives, notes, assignments, etc.: Web site, Moodle, Course schedule
  • Join and become familiar with the EPL133 Page on Moodle and learn how to use it to ask questions, contribute with answers and communicate with the lecturer and teaching assistants.
  • Become familiar with the EPL133 contract.
  • Refresh Java Programming and execution skills.
  • Understand and explain the concept of class.
Readings:
Lab 0: 19/1 Review basic Java programming environments and tools.
Learning Objectives:
  • Review the process of compiling and executing Java programs using the command line.
  • Organise your directory structure for EPL133.
  • Review the use of Eclipse.
Readings:
Precept: 20/1 Object-Oriented Thinking in Simple Problems Notes
Learning Objectives:
  • Help students get to know each other and work on common projects.
  • Experiment with the tools for synchronous, online teaching and class etiquette: Zoom and cameras, Zoom background, Teams.
  • Understand how to adopt an object-oriented approach when coding simple Java programs.
Readings:
  • Review Chapters 1-3. "Absolute Java", Walter Savitch.
  • Browse Java Tutorials by Oracle.
Lecture 2: 22/1 Introduction to Computational Thinking. Notes
Learning Objectives:
  • Understand computational thinking and be able to model and solve problems computationally.
  • Understand the concepts of problem formulation, problem solving, and state representation in solving computational problems.
  • Understand the concept of well-defined problems and apply it to translate abstract problem descriptions to computational problems.
Readings:
  • Review Chapters 1-3. "Absolute Java", Walter Savitch.
Lab 1: 22/1 Design your first Java classes. Notes
Learning Objectives:
  • Design and implement a Rational class.
  • Design and implement a Rectangle class.
Readings:
  • Chapters 1-3. "Absolute Java", Walter Savitch.
  • Java Tutorials by Oracle.
Lecture 3: 26/1 The Java Platform. Notes Video: History & Key Concepts Video: Java Platform Overview
Learning Objectives: Understand and be able to explain and use:
  • Key programming terminology: compilation, interpretation, debugging, virtual machine, source code, object code, assembly language, intermediate languages.
  • Basic concepts of object-oriented programming.
  • The history of Object-oriented Programming.
  • The main aspects of the Java programming language.
  • The Java platform.
  • Interpretation vs. Compilation of computer programs.
  • Τhe Java Virtual Machine (JVM) and Bytecodes.
  • The concept of Multi-threading.
  • The lifecycle of a Java program.
Readings:
Lab 2: 26/1 Review Java programming style and comments. Notes
Learning Objectives:
  • Understand and properly apply Java coding standards and Javadoc style comments.
  • Understand how to access and use online Java documentation.
  • Design and implement a QuadraticEquation class
  • Design and Implement a Linear Equation System class
Readings:
  • Chapters 1-3. "Absolute Java", Walter Savitch.
  • Java Tutorials by Oracle.
Precept 2: 28/1 Lifecycle of a Java program.
Learning Objectives:
  • Refresh your knowledge of Java programming and recursion, and explore the concepts of class design, object state and performance through the example of a Fibonacci implementation in Java.
  • Practice with the concepts of compilation, interpretation, the role of JVM, and bytecodes.
Lecture 4: 29/1 Introduction to Object-Oriented Programming Abstractions. Notes
Learning Objectives: Understand, identify and be able to employ key concepts of abstraction, such as 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.1 "Absolute Java", Walter Savitch.
Lab 3: 29/1 Hands-on Examples of using Abstraction in Problem Solving. Notes
Learning Objectives: Explore the use of abstraction in problem solving.
  • Design and implement a RegularPolygon class
  • Design and implement a StatisticClaculation class
Module 2: Class Design and Memory Allocation (Σχεδιασμός Κλάσεων. Διαχείριση Μνήμης).
Lecture 5: 2/2 Class Design in Java. Notes Video: Elements of Java Classes Learning Objectives: Understand, identify and be able to:
  • Design Java classes, create Java objects, invoke methods and make proper use of method parameters, arguments, and object handles.
  • Explain the concept of call-by-value vs. call-by-reference argument passing.
  • Use the parameter "this".
Readings:
  • Chapter 4.1 "Absolute Java", Walter Savitch.
Lab 4: 02/2 Class design in Java. Notes
Learning Objectives: Explore examples of class definition in Java.
  • Design a class representing a circle.
  • The green mice. Create "mice" in different ways and make them "evolve" over time.
  • Design a class representing a triangle.
Precept 3: 3/2 Class design examples
Learning Objectives: Review the design of Java classes using information hiding and encapsulation.
Lecture 6: 5/2 OOP Abstraction. Initializers and Constructors. Notes Video: OOP Abstractions in Java Video: Initializers and Constructors Learning Objectives:
  • Understand the concepts of information hiding and encapsulation in Java.
  • Private and public class members.
  • Accessor and Mutator Methods.
  • Understand Java object construction and initialization.
  • Method and constructor overloading.
Readings:
  • Chapter 4.2, 4.3, 4.4. "Absolute Java", Walter Savitch.
  • Review of recursion. Chapter 11. "Absolute Java", Walter Savitch.
Lab 5: 05/02 Exploring Memory Management in Java. Notes
Learning objectives: 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
  • Understanding static and dynamic string concatenation in Java.
  • Garbage collector in use
  • Static Initialization Block
Lecture 7: 9/2 Memory Management in Java. Notes Video: Memory Management Introduction Video: Java Memory Management Learning Objectives: Understand, explain and use the concepts of:
  • Java object construction and initialization.
  • Method and constructor overloading.
  • Memory Management.
  • Memory allocation.
  • The organization of virtual memory, the concepts of stack, heap and static memory.
  • Memory management in Java.
  • Activation records (stack frames) and their role in maintaining method invocation semantics.
  • Heap-space allocation for storing Java objects.
  • Review of memory management in the presence of method calls: stack, stack-frames (activation records), heap.
Readings:
Lab 6: 9/2 JUnit Tests. Notes
Learning Objectives: Explore the JUnit testing platform.
  • Creating JUnit tests in Eclipse
  • Writing tests
  • Running your tests cases
Precept 4: 10/2 Object-oriented Design: Introduction Video: OO Design Methodology
Learning Objectives:
  • Review key elements of the object-oriented design.
  • Become familiar and put to practice the O.O. design methodology.
  • Use the Class-Responsibility-Collaborators (CRC) cards to design your classes.
Readings:
  • Chapter 12. Absolute Java. Walter Savitch.
  • Chapter 2. Object-Oriented Design and Patterns. Cay Horstmann, Wiley, 2006.
Lecture 8: 12/2 Static variables and methods. Garbage collection. Wrapper Classes Class Parameters Object Equality Notes Learning Objectives: Be able to understand, explain and use the concepts of:
  • Review examples of static variables and methods and be able to explain and implement the concept.
  • Review what happens during object construction and initialization.
  • Understand the concept of garbage collection. Garbage collection in Java and related methods. Algorithms for garbage collection.
  • Static memory, static variables (class variables) and static methods (class methods).
  • Understand and be able to use wrapper classes instead of primitive types.
  • Revisit the call-by-value approach for passing arguments to method calls in the case of class parameters.
Readings:
  • Chapter 5. "Absolute Java", Walter Savitch.
  • Review recursion and stacks for recursion. Chapter 11. "Absolute Java", Walter Savitch.
Lab 7: 12/2 Garbage collector in Java. Notes
Learning Objectives Learning Objectives: Explore the memory allocation and garbage collection mechanisms of Java programs.
  • Understanding static and dynamic string concatenation in Java.
  • Garbage collector in use.
  • Static Initialization Block.
Lecture 9: 16/2 Invariants. Notes Learning Objectives:
  • Understand the concept of invariants, class invariants and their implications for class design.
  • Apply class invariants in constructors and methods. Expand on encapsulation and information hiding through copy constructors.
  • Understand the concepts of privacy leakage, mutable and immutable classes, and how to address privace leakage.
Readings: Chapter 5. "Absolute Java", Walter Savitch.
Precept 5: 17/2 CRC Cards and Invariants
Learning Objectives:
  • Review key elements of class design using CRC cards.
  • Apply the Class-Responsibility-Collaborators (CRC) card methodology to design the classes for Tik-tak-toe.
  • Identify invariants for your Tik-tak-toe design.
Readings:
  • Chapter 12. Absolute Java. Walter Savitch.
  • Chapter 2. Object-Oriented Design and Patterns. Cay Horstmann, Wiley, 2006.
Quiz 1: 16/2 Quiz 1.
Lecture 10: 19/2 Code reuse in Java. Notes Java Packages Name Visibility Programming Conventions Learning Objectives:
  • Understand and explain how to create and re-use Java libraries (packages).
  • Understand, explain, and use the Linux filesystem and environment variables.
  • Understanding the role of CLASSPATH and how to set it up.
  • Overview of naming conventions for packages, classes, variables.
Readings: Chapter 5.4 Absolute Java Walter Savitch.
Module 3: Inheritance (Κληρονομικότητα).
Lecture 11: 23/2 Inheritance. Notes Learning objectives:
  • Understand and apply the concepts of class re-use through composition and inheritance.
  • Understand and apply the concept inheritance as an abstraction and Java programming technique.
  • Develop an understanding of the relation between inheritance and class hierarchy.
Readings: Chapter 7. Absolute Java Walter Savitch.
Lab 10: 23/2 Inheritance in Java. Notes
Learning Objectives: Introducing inheritance in Java.
  • How super(), this() works.
  • The equals() method and inheritance.
Midterm I: 26/1 Topics: Chapters 1, 2, 3, 4, 5. of Absolute Java Walter Savitch, and Class Notes.
Lecture 12: 2/3 Inheritance continued. Notes
Learning Objectives:
  • Understand and apply inheritance mechanisms.
  • Understand, explain and apply method overriding.
Readings: Chapter 7. Absolute Java Walter Savitch.
Precept 6: 3/3 Example of O.O. Design with CRC Cards. ATM Design with CRC
Learning outcome: Review of example with CRCs.
Readings: Chapter 2. Object-Oriented Design and Patterns. Cay Horstmann, Wiley, 2006.
Lab : 2/3 Finish previous lab. Notes
Learning outcome: Solve different problems using inheritance in Java.
Lecture 13: 5/3 Inheritance and Object Construction. Notes Encapsulation and Inheritance
Learning Objectives:
  • Understand and explain how object construction works in the case of inherited classes.
  • Be familiar with Final classes and final class members.
  • Understand and explain the differences of access specifiers: private, protected, public.
  • Understand, recognize and apply of upcasting and its implications.
  • Review of examples with inheritance and upcasting. The "Object" class.
Readings: Chapter 7. Absolute Java Walter Savitch.
Lab 11: 5/3 Inheritance in Java - continued. Notes
Learning outcome: Solve different problems using inheritance in Java.
Lecture 14: 9/3 Upcasting. Notes
Learning objectives: Understand, recognize and apply of upcasting and its implications. Review of examples with inheritance and upcasting. The "Object" class.
Readings: Chapter 7. Absolute Java Walter Savitch.
Lab 12: 9/3 Polymorphism. Notes
Learning Objectives:
  • Polymorphic behavior via method overriding.
Precept 7: 25/2 Review of inheritance and upcasting. Notes
Learning outcome: Review of examples with inheritance. Understand the concept of Software patterns. Recognize and apply Code re-use through composition and delegation as an alternative to inheritance.
Readings:
  • Chapter 4.4 (StringTokenizer class) Absolute Java Walter Savitch.
  • Chapter 7. Absolute Java Walter Savitch.
  • StringTokenizer API.
Module 4: Polymorphism, Αbstract Classes, Interfaces and Inner Classes (Πολυμορφισμός, Αφαιρετικές Κλάσεις, Διαπροσωπείες κ. Εσωτερικές Κλάσεις).
Lecture 15: 12/3 Introduction to Polymorphism. Notes Learning objectives:
  • Understand and recognize the concept of Polymorphism.
  • Understand and explain the concept of binding.
Readings: Chapter 8. Absolute Java Walter Savitch.
Lab 13: 12/3 Exercises on Polymorphism in Java. Notes
Learning Objectives:
  • Polymorphic behavior via abstract classes.
  • Polymorphic copy.
  • Liskov Substitution Principle.
Lecture 16: 16/3 Polymorphism - continued. Notes Learning Objectives:
  • Understand, explain and apply the concept of polymorphic method calls.
  • Understand, apply and explain the concept of binding, static and dynamic.
  • Understand and explain the concepts of compile-time vs. execution-time.
  • Understand and apply how Polymorphism works with Static methods: Overriding vs. Hiding.
Readings: Chapter 8. Absolute Java, Walter Savitch.
Lab 14: 16/3 Exercises on Polymorphism in Java. Notes
Learning outcome:
  • Polymorphic behavior via abstract classes.
Precept 8: 17/3 Polymorphism practice. Notes
Learning outcome: Understand and explain binding of static methods. Explore examples of polymorphism, hiding vs. overriding.
Readings: Chapter 8.1, Absolute Java, Walter Savitch.
Lecture 17: 18/3 Polymorphism - continued. Notes Learning Objectives:
  • Explore, explain and apply the relation between polymorphism and instance variables.
  • Understand, explain and apply how polymorphism works inside constructors.
  • Understand, explain and apply the concept of downcasting.
  • Understand, explain and apply the clone method.
  • Understand, explain and apply alternative ways for polymorphic behavior through the change-state design pattern.
Readings: Chapter 8. Absolute Java, Walter Savitch.
Lecture 18: 23/3 Abstract Classes and Interfaces Introduction Notes Learning Objectives:
  • Understand, describe and apply abstract classes.
  • Understand, describe and apply the concept of Interface.
  • See how interfaces are used in practice.
Readings:
  • Chapter 8.2 Absolute Java Walter Savitch.
  • Chapter 13.1. Absolute Java Walter Savitch.
Lab 15: 23/3 Introduction to Interfaces. Notes
Learning outcome: Using interfaces in Java.
  • Interfaces and inheritance.
  • Modelising geometric shapes using interfaces.
  • Example using Comparable interface.
Precept 9: 24/3 Using Interfaces. Notes Learning Objectives:
  • See how interfaces are used in practice.
  • Understand and apply the concept of Interfaces to develop general sorting code.
  • Understand and apply the definition of constants inside Interfaces.
Readings:
  • Chapter 8.2 Absolute Java Savitch & Mock.
  • Chapter 13.1. Absolute Java Savitch & Mock.
Lecture 19: 26/3 Multiple Inheritance and Default Methods. Notes
Learning objectives:
  • Understand and apply multiple inheritance through Interfaces.
  • Understand uses of Serializable and Clonable interface.
  • Understand the impact of conflicts in interface inheritance.
  • Default methods.
Readings: Chapter 13.1, Absolute Java Walter Savitch.
Lab 16: 26/3 Exercises Interfaces - continued. Notes
Learning outcome: Using interfaces in Java.
  • More exercises on interfaces in Java.
  • Modelising shapes using interfaces - continued
Midterm II: 30/3 Topics: Chapters 1, 2, 3, 4, 5, 6, 7, 8, 13.1 of Absolute Java Walter Savitch, and Class Notes.
Precept 10: 31/3 Introduction to Inner Classes. Notes Learning Objectives:
  • Understand and explain the concept and syntax of inner classes.
  • Understand, explain, and apply inner class uses.
Readings: Chapter 13.2, 13.3 Absolute Java Walter Savitch.
Lecture 20: 2/4 Elements of Inner Classes. Notes Video Learning Objectives:
  • Understand, explain, and apply static inner classes and their use.
  • Review simple examples of inner-class use.
  • Understand, explain and apply the concept of local inner classes.
Readings: Chapter 13.2, 13.3 Absolute Java Walter Savitch.
Lab 17: 2/4 Inner Classes & SOLID design principles. Notes
Learning outcome:
  • Exercises on Inner Classes.
  • The Liskov Substitution Principle.
  • The Interface Segregation Principle.
Lecture 21: 6/4 Anonymous Inner Classes, Closures and Callbacks. Notes Learning Objectives:
  • Understand and apply inner classes in the Factory Method software pattern.
  • Understand the concept of closure and callbacks.
  • Understand, explain and use inner classes to implement callbacks in Java.
Readings: Chapter 13.3 Absolute Java Walter Savitch, and class-notes.
Lab 18: 6/4 Exceptions in Java. Notes
Learning outcome: Using exceptions, make your own exception classes.
Precept 11: 7/4 Application Frameworks. Notes Learning Objectives:
  • Understand, explain and apply inner classes to develop application frameworks with event-driven programming.
Readings: Chapter 13.2, 13.3 Absolute Java Walter Savitch.
Quiz 2: 9/4 Quiz 2.
Module 5: Exception Handling and File I/O (Διαχείριση Εξαιρέσεων και Είσοδος/'Εξοδος σε Αρχεία).
Lecture 22 Exception Handling. Notes Program Errors Exception Handling Programming with Exceptions Learning outcome:
  • Understand the concept of exceptions and faults.
  • Introduction to exception handling in Java.
  • Understand and apply Programming Techniques for Exception Handling.
Readings: Chapter 9. Absolute Java Walter Savitch.
Lecture 23 Input/Output in Java. Notes I/O Intro Files in Java Binary Files Random Access Files Learning outcome:
  • Understand and apply basic concepts of file systems and I/O.
  • Become familiar with and be able to apply File I/O Techniques in Java.
  • Text and Binary Files to store and process data.
  • Basic Input-Output Classes of Java: Scanner, Buffered Reader.
  • Understand and apply the concepts of streams, text and binary files and I/O.
  • Mastery of the File Class.
  • Mastery of Binary Files.
  • Mastery of Random-Access Files.
Readings: Chapter 10. Absolute Java Walter Savitch.
Lab 19: 13/4 Exercises on File I/O. Notes
Learning outcome: Using streams in Java. Byte Streams, Character Streams.
Module 6: Generics and Collections (Γενόσημοι Τύποι, Κιβώτια και Συλλογές).
Lecture 24: 10/4 ArrayList. Notes Learning Objectives:
  • Review, understand and apply the capabilities of the ArrayList class.
  • Understand and explain the concept of class parameters.
Readings: Chapter 14 Absolute Java Walter Savitch, and class-notes.
Lecture 25: 13/4 Generics. Notes Learning Objectives:
  • Understand, explain and apply the concept of Generic types and Generic Programming.
  • Understand, use and be familiar with the terminology of Generics.
  • Understand and explain the advantages offered by Generics.
  • Explore, understand, and explain various pitfalls regarding Generics.
  • Understand and explain the implementation of Generics through type erasure.
Readings: Chapter 14 Absolute Java Walter Savitch, and class-notes.
Precept 12: 14/4 Generic Programming Examples. Notes Learning Objectives:
  • Work on simple examples using Generics.
Readings: Chapter 14 Absolute Java Walter Savitch.
Lecture 26: 16/4 Generics and Collections. Notes Learning Objectives:
  • Generic Methods.
  • Understand and explain the relation between Generics and Inheritance.
  • Understand, explain and apply the concept of Generic Methods.
Readings: Chapter 14, 15 Absolute Java Walter Savitch, and class-notes.
Lab 20: 16/4 Exercises on Generics. Notes
Learning outcome: Implement generic classes in Java.
Lab 21: 16/4 Exercises on Collections. Notes
Learning outcome: Using collections in Java.
  • Using HashMaps.
  • Using HashSets.