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

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

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

Module 1: Introduction to Object-Orientation.
Topic 1: Lect. 17/1 Course Overview and Java Programming Review. Notes
Learning Objectives:
  • Understand how to study and succeed in EPL133.
  • Refresh Java Programming and execution skills.
  • Understand and explain the concept of Java Classes.
Readings:
Lab 0 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 IntelliJ and/or Eclipse.
Readings:
Topic 1: Prec. 20/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.
Topic 2: Lect. 20/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 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.
Topic 3: Lect. 25/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 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.
Topic 1: Precept 27/1 Programming Style Notes Programming Conventions
Learning Objectives:
  • Overview of naming conventions for packages, classes, variables.
Readings:
Topic 4: Lect 27/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 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 (Σχεδιασμός Κλάσεων. Διαχείριση Μνήμης).
Topic 5 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 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 Class design examples
Learning Objectives: Review the design of Java classes using information hiding and encapsulation.
Topic 6 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 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
Topic 7 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 JUnit Tests. Notes
Learning Objectives: Explore the JUnit testing platform.
  • Creating JUnit tests in Eclipse
  • Writing tests
  • Running your tests cases
Precept 4 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.
Topic 8 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 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.
Topic 9 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 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.
Topic 10 Code reuse in Java. Notes Java Packages Name Visibility 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.
Readings: Chapter 5.4 Absolute Java Walter Savitch.
Module 3: Inheritance (Κληρονομικότητα).
Topic 11 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 Inheritance in Java. Notes
Learning Objectives: Introducing inheritance in Java.
  • How super(), this() works.
  • The equals() method and inheritance.
Topic 12 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 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 Finish previous lab. Notes
Learning outcome: Solve different problems using inheritance in Java.
Topic 13 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 Inheritance in Java - continued. Notes
Learning outcome: Solve different problems using inheritance in Java.
Topic 14 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 Polymorphism. Notes
Learning Objectives:
  • Polymorphic behavior via method overriding.
Precept 7 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 (Πολυμορφισμός, Αφαιρετικές Κλάσεις, Διαπροσωπείες κ. Εσωτερικές Κλάσεις).
Topic 15 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 Exercises on Polymorphism in Java. Notes
Learning Objectives:
  • Polymorphic behavior via abstract classes.
  • Polymorphic copy.
  • Liskov Substitution Principle.
Topic 16 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 Exercises on Polymorphism in Java. Notes
Learning outcome:
  • Polymorphic behavior via abstract classes.
Precept 8 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.
Topic 17 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.
Topic 18 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 Introduction to Interfaces. Notes
Learning outcome: Using interfaces in Java.
  • Interfaces and inheritance.
  • Modelising geometric shapes using interfaces.
  • Example using Comparable interface.
Precept 9 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.
Topic 19 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 Exercises Interfaces - continued. Notes
Learning outcome: Using interfaces in Java.
  • More exercises on interfaces in Java.
  • Modelising shapes using interfaces - continued
Precept 10 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.
Topic 20 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 Inner Classes & SOLID design principles. Notes
Learning outcome:
  • Exercises on Inner Classes.
  • The Liskov Substitution Principle.
  • The Interface Segregation Principle.
Topic 21 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 Exceptions in Java. Notes
Learning outcome: Using exceptions, make your own exception classes.
Precept 11 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.
Module 5: Exception Handling and File I/O (Διαχείριση Εξαιρέσεων και Είσοδος/'Εξοδος σε Αρχεία).
Topic 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.
Topic 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 Exercises on File I/O. Notes
Learning outcome: Using streams in Java. Byte Streams, Character Streams.
Module 6: Generics and Collections (Γενόσημοι Τύποι, Κιβώτια και Συλλογές).
Topic 24 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.
Topic 25 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 Generic Programming Examples. Notes Learning Objectives:
  • Work on simple examples using Generics.
Readings: Chapter 14 Absolute Java Walter Savitch.
Topic 26 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 Exercises on Generics. Notes
Learning outcome: Implement generic classes in Java.
Lab 21 Exercises on Collections. Notes
Learning outcome: Using collections in Java.
  • Using HashMaps.
  • Using HashSets.