Object Oriented Programming

Base Knowledge

N/A

Teaching Methodologies

Not available

Learning Results

It is expected that at the end of the course the student will be able to:
1. Identify the basic concepts of Object Oriented Programming (OOP): objects, classes, polymorphism and inheritance;
2. Implement and manage static (uni and multi-dimensional tables) and dynamic (java collections, namely arrays, vectors and hashtables) data structures;
3. Use persistent memory structures: files (binary, text and objects);
4. Plan, develop and test programs using the Java language.

Program

1. Introduction to the Java language;
Structure and syntax; main method; Structure of classes and methods; Data types; Primitive data types; Variables and Constants; Declaration of variables; Passing parameters by copy and by reference; Conversion and Casting; Data output; Data Entry (Scanner); Predefined classes (wrapper classes); Operators; Flow control; User interaction (System.in, System.out); Object, String, StringTokenizer and Math classes; Java Libraries; Java API;
2. Object Oriented Programming (OOP): Classes and Objects;
Creation and instantiation of objects; Manipulation of objects; Memory resource and Garbage collector; Communication between objects; Passing objects by parameters (copy of the reference and copy of the
value); Builders; operator this,; static operator; Visibility modifiers (private, public, protected; friendly); Instance variables and class variables; Instance and class methods; Static methods; Inner Classes (nested / inner), local classes and anonymous classes;
Method rewriting (method overloading);
3. Handling of Exceptions;
Types and handling of exceptions; block try/catch and try/catch/finally;
Throwing exceptions; Throw and throws clauses; Exception Hierarchy; Declaration of exceptions;
4. Static data structures: Unidimensional and Multidimensional Tables;
Creation of tables; Size and indexes of the tables; Initialization of tables; Copy of tables; Passing tables as parameters;
5. Dynamic data structures: Java Collections;
ArrayList, Vectors and Dictionaries; Search and iterate data structures; Creation and manipulation of dynamic structures; Application, manipulation and access to elements of dynamic structures; Iteration of dynamic structures: iterator and enumeration class; Collections – predefined implementations of structures in Java; Collection Framework; Collection types: Set, List, Map, SortedSet, SortedMap; Collection implementations; Interface Comparable and Comparator; Sorting metodologies;
6. Files: Text, Binary and Object; Java Properties;
Reading data from input devices; Data flow; Streams; Data reading from input devices (InputStreamReader, BufferedReader and Scanner classes); Manipulation of files and directories (Class File); Universal resource access; Manipulation of Text Files (FileReader and BufferedReader classes for reading and FileWriter, BufferedWriter and PrintWriter for writing); Binary File Manipulation (classes FileOutputStream and DataOutputStream for reading and FileInputStream and DataInputStream for writing); Updating text and binary files; Handling exceptions in accessing I/O devices; Java Properties; Object File Manipulation (classes FileOutputStream and ObjectOutputStream for writing and FileInputStream and ObjectInputStream for reading); Updating object files; Serializable classes;
7. Object Oriented Programming (OOP): Inheritance and Polymorphism;
Introduction to the concept of Heredity; Extends reserved word; SubClasses and SuperClasses; Visibility and encapsulation modifiers; Invocation of superclass (super) methods and constructors; Inheritance of characteristics and behaviors; Redefinition of inherited methods (method overriding); Class Hierarchy; Creating objects from derived classes; Final and InstanceOf operators; Polymorphic reference; Referenced objects and invoked methods; Definition of polymorphic references; Accessibility of Variables, Methods and Classes; Method Overloading and Overriding; Upcasting and Downcasting.

Internship(s)

NAO

Bibliography

Flanagan, D. , & Evans, B. (2019). Java in a nutshell – A desktop quick reference (7.ª ed). O’Reilly.
Jesus, C. (2013). Curso prático de java. FCA.
Martins, F. (2017). Java 8 – POO + construções funcionais. FCA.
Martins, F. (2014). Projectos de POO em java. FCA.
Urma, R., Fusco, M., & Mycroft, A. (2018). Modern java in action – Lambdas, streams, functional and reactive programming. Manning.