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

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

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

Module 1: Introduction to Object-Orientation.
17/1 (lecture) 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: 17/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 IntelliJ and/or Eclipse.
Readings:
20/1 (precept) 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.
20/1 (lecture) 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: 20/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.
25/1 (lecture) 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: 24/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.
27/1 (precept) Programming Style Notes Programming Conventions
Learning Objectives:
  • Overview of naming conventions for packages, classes, variables.
Readings:
27/1 (lecture) 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: 27/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 (Σχεδιασμός Κλάσεων. Διαχείριση Μνήμης).
31/1 (lecture) 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: 31/1 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.
3/2 (precept) Class design examples Notes
Learning Objectives: Review the design of Java classes using information hiding and encapsulation.
3/2 (lecture) 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: 3/2 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
Lab 6: 7/2 JUnit Tests. Notes
Learning Objectives: Explore the JUnit testing platform.
  • Creating JUnit tests in Eclipse
  • Writing tests
  • Running your tests cases
7/2, 10/2 (lecture) Memory Management in Java. Notes 7/2 Notes 10/2 Video: Memory Management Introduction 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.
  • 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.
  • 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).
  • Review examples of static variables and methods and be able to explain and implement the concept.
Readings:
10/2 (precept) Memory management examples Video: Java Memory Management
Learning Objectives: Review the operation of the stack and the heap during the execution of a Java program.
Lab 7: 10/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.
14/2 (lecture) Wrapper Classes. Notes Wrapper Classes Class Parameters Object Equality Learning Objectives: Be able to understand, explain and use the concepts of:
  • 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.
  • Controlling for the equality of objects.
Readings:
  • Chapter 5. "Absolute Java", Walter Savitch.
  • Review recursion and stacks for recursion. Chapter 11. "Absolute Java", Walter Savitch.
14/2, 17/2 (lect.) Invariants. Notes 14/2 Notes 17/2 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.
Quiz 1: 14/2 Quiz 1.
17/2 (precept) Practice with Invariants Notes
Learning Objectives:
  • Undestand and apply class invariants.
Readings:
  • Chapter 12. Absolute Java. Walter Savitch.
  • Chapter 2. Object-Oriented Design and Patterns. Cay Horstmann, Wiley, 2006.
Lab 8: 17/2 Classes and Objects exercises. Notes
Learning Objectives Learning Objectives: Java Practice Questions On Classes And Objects.
  • Strings, Arrays in Java.
  • Static variables, Static Initialization Block, Instance Initialization Block.
Module 3: Inheritance (Κληρονομικότητα).
21/2, 24/2 (lect.) Inheritance. Notes 21/2 Notes 24/2 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 9: 21/2 UML class diagrams. Notes
Learning Objectives:
  • How to use Modelio.
  • Design UML class diagrams with Modelio
24/2 (precept) 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.
Lab 10 24/02 Inheritance in Java. Notes
Learning Objectives: Introducing inheritance in Java.
  • How super(), this() works.
  • The equals() method and inheritance.
28/2 (lecture) 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, explain, and apply the concepts of Composition vs Inheritance.
  • Understand, explain, and apply the concept of Design Patterns and Delegation.
Readings: Chapter 7. Absolute Java Walter Savitch.
Lab 10.1 28/2 Finish previous lab. Notes
Learning outcome: Solve different problems using inheritance in Java.
3/3 (precept) Programming Techniques and Inheritance. Notes
Learning outcome:
  • Text processing and tokens.
  • Markov Chain algorithm for text generation.
  • Review of examples with inheritance: processing strings with StringTokenizer.
  • The "Object" class.
  • Class introspection with getClass() and instanceOf.
Readings:
  • Chapter 4.4 (StringTokenizer class) Absolute Java Walter Savitch.
  • Chapter 7. Absolute Java Walter Savitch.
  • StringTokenizer API.
3/3 (lecture) Upcasting. Notes
Learning objectives:
  • Understand, recognize and apply of upcasting and its implications.
  • Review of examples with inheritance and upcasting.
  • Understand and explain how encapsulation specifiers work with inheritance and the differences between access specifiers: private, protected, public.
Readings: Chapter 7. Absolute Java Walter Savitch.
Lab 11 3/3 Inheritance in Java - continued. Notes
Learning outcome: Solve different problems using inheritance in Java.
Module 4: Polymorphism, Αbstract Classes, Interfaces and Inner Classes (Πολυμορφισμός, Αφαιρετικές Κλάσεις, Διαπροσωπείες κ. Εσωτερικές Κλάσεις).
7/3 (lecture) 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 12 7/3 Polymorphism. Notes
Learning Objectives:
  • Polymorphic behavior via method overriding.
10/3 (precept) UML Class Diagrams and Associations. Problem Solving. Notes
Learning outcome:
  • Understand, explain, and apply the design of programs using pseudocode and UML.
  • Understand, explain, and apply UML class diagrams and UML associations between classes.
  • Discuss and explain the application of Markov chain algorithm for the automated generation of text.
Readings:
  • Chapter 12, Absolute Java, Walter Savitch.
  • Object-Oriented Design and Patterns. Cay Horstmann, Wiley, 2006.
  • Chapter 3, The Practice of Programming. Kernighan and Pike, Addison Wesley, 1999.
10/3 (lecture) 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 13 10/3 Exercises on Polymorphism in Java. Notes
Learning Objectives:
  • Polymorphic behavior via abstract classes.
  • Polymorphic copy.
  • Liskov Substitution Principle.
14/3 (lecture) 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.
Midterm: 17/3 Labs B121, B123, 9-10:10:20 (1A, 1B), 10:30-11:50 (1Γ, 1Δ).
Topics: Chapters 1, 2, 3, 4, 5, 6, 7, 8, 11, 12 of Absolute Java Walter Savitch, and Class Notes.
Lab 14 14/3 Exercises on Polymorphism in Java. Notes
Learning outcome:
  • Polymorphic behavior via abstract classes.
21/3 (lecture) 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 24/3 Introduction to Interfaces. Notes
Learning outcome: Using interfaces in Java.
  • Interfaces and inheritance.
  • Modelising geometric shapes using interfaces.
  • Example using Comparable interface.
24/3 (precept) Using Interfaces. Notes Learning Objectives:
  • See how interfaces are used in practice.
  • Learn and apply the selection sort algorithm.
  • Understand and apply the concept of Interfaces to develop general sorting code.
  • Understand and apply the definition of constants inside Interfaces.
  • Understand and apply the Strategy Design Pattern using interfaces.
Readings:
  • Chapter 8.2 Absolute Java Savitch & Mock.
  • Chapter 13.1. Absolute Java Savitch & Mock.
24/3 (lecture) Multiple Inheritance, Default Methods. Introduction to Inner Classes. 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.
  • Understand and explain the concept and syntax of inner classes.
  • Understand, explain, and apply inner class uses.
Readings:
  • Chapter 13.1, Absolute Java Walter Savitch.
  • Chapter 13.2, 13.3 Absolute Java Walter Savitch.
Lab 16 28/3 Exercises Interfaces - continued. Notes
Learning outcome: Using interfaces in Java.
  • More exercises on interfaces in Java.
  • Modelising shapes using interfaces - continued
28/3 (lecture) 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.
31/3 (precept) Anonymous Inner Classes and Application Frameworks. Notes Learning Objectives:
  • Learn, explain, and apply anonymous inner classes.
  • Learn, explain, and apply the Factory Design Pattern.
  • Apply anonymous inner classes to implement the Factory Design Pattern.
  • Understand, explain and apply inner classes to develop application frameworks with event-driven programming.
Readings: Chapter 13.2, 13.3 Absolute Java Walter Savitch.
Lab 17 31/3 Inner Classes & SOLID design principles. Notes
Learning outcome:
  • Exercises on Inner Classes.
  • The Liskov Substitution Principle.
  • The Interface Segregation Principle.
Module 5: Exception Handling and File I/O (Διαχείριση Εξαιρέσεων και Είσοδος/'Εξοδος σε Αρχεία).
4/4 (lecture) Exception Handling and I/O. 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.
  • Introduction to input/output.
  • Understand and explain the concept of character encodings and Unicode.
Readings: Chapter 9. Absolute Java Walter Savitch.
Quiz 2: 4/4 Quiz 2.
Lab 18 7/4 Exceptions in Java. Notes
Learning outcome: Using exceptions, make your own exception classes.
7/4 (lect. and precept) 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 Take Home Lab Exercises on File I/O. Notes
Learning outcome: Using streams in Java. Byte Streams, Character Streams.
Module 6: Generics and Collections (Γενόσημοι Τύποι, Κιβώτια και Συλλογές).
25/4 (lecture) ArrayList and Generics. Notes Learning Objectives:
  • Review, understand and apply the capabilities of the ArrayList class.
  • Understand and explain the concept of class parameters.
  • 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.
28/4 (precept) Generic Programming Examples. Notes Learning Objectives:
  • Work on simple examples using Generics.
Readings: Chapter 14 Absolute Java Walter Savitch.
Lab 20 25/4 Exercises on Generics. Notes
Learning outcome: Implement generic classes in Java.
28/4 (lecture) 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 21 28/4 Exercises on Collections. Notes
Learning outcome: Using collections in Java.
  • Using HashMaps.
  • Using HashSets.
End of Class Τέλος και τω Θεώ η Δόξα.