Unit INFORMATICS II

Course
Mathematics
Study-unit Code
55123509
Curriculum
In all curricula
Teacher
Stefano Marcugini
Teachers
  • Stefano Marcugini
  • Marco Baioletti
Hours
  • 78 ore - Stefano Marcugini
  • 10 ore - Marco Baioletti
CFU
9
Course Regulation
Coorte 2022
Offered
2023/24
Learning activities
Affine/integrativa
Area
Attività formative affini o integrative
Academic discipline
INF/01
Type of study-unit
Obbligatorio (Required)
Type of learning activities
Attività formativa monodisciplinare
Language of instruction
Italian
Contents
OBJECT ORIENTED PROGRAMMING
Model of the objects;
Encapsulation;
Inheritance;
Polymorphism.

INTRODUCTION TO JAVA LANGUAGE
Structured programming.
Array.
Classes and methods;
Applications and Applet;
Java Packages;
Ecceptions;
Multithreading;
Input and Output;
Expressions;
Event oriented programming;
Socket; Client-server applications.


EXAMPLES OF ALGORITHMS

Recursion.
Reference texts
Textbooks:

Concetti di informatica e fondamenti di Java settima edizione per Java 8, 9, 10 e 11
di Cay Horstmann
Maggioli Editore


Core Java 2 vol.2 di Cay S. Horstmann, Gary Cornell - Pearson - 2005

For the two chapters:
Multithreading;
Network Programming.

Other books you can consult

Java 2 Guida Completa- L.Lemay, C.L. Perkins, Edizioni Sams net


Java 2 i fondamenti - Cay S. Horstmann e Gary Cornell - Mc Graw Hill;
Java 2 tecniche avanzate - Cay S. Horstmann e Gary Cornell - Mc Graw Hill;

in English:

Core Java Volume I--Fundamentals, 9th Edition, Cay S. Horstman, Prentice Hall. Part of the Pearson Custom Library: Computer Science series.

Core Java, Volume II--Advanced Features, 9th Edition, Cay S. Horstman, Prentice Hall. Part of the Pearson Custom Library: Computer Science series.

All books are available at the library:
Educational objectives
Understanding the concepts of object-oriented programming and events.
Ability to build applications.
Ability to compare possible solutions to choose the best.
Ability to apply patterns of classical solutions to new problems.
Ability to design the hierarchy of objects suitable to the specific problem.
Ability to implement programs of professional interfaces.
Prerequisites
It is useful to have taken the exam of Procedural programming.

In particular it is important to be familiar with the following concepts: pointers, dynamic memory management, elementary algorithms.
Teaching methods
Lectures, laboratory exercises.
Other information
Website: www.unistudium.unipg.it

For the exam schedule, see:
www.informatica.unipg.it
Learning verification modality
Written and oral exam. Tests of exoneration are planned during the course.
The written exam involves the solution of three exercises and is designed to test the ability to correctly apply the theoretical knowledge and understanding of the issues proposed.
The written exam lasts three hours.

The oral exam is a discussion lasting about 30 minutes designed to ascertain the level of knowledge and understanding about the theoretical contents of the course reached by the student. Also the oral exam will test the ability of communication of the student and the ability of autonomous organization of the speech.
At the request of the student the exam may be taken also in English.
For information on support services for students with disabilities and / or DSA visit the page http://www.unipg.it/disabilita-e-dsa
Extended program
OBJECT ORIENTED PROGRAMMING
Model of objects for reference;

Java language
Compilation and interpretation.

Object Oriented Programming in Java
Classes and Objects. Attributes and behavior. Inheritance, interfaces and packages.

Elements of language
Comments. Variables. Types of data. Constant values. Expressions. Operators, precedence, associativity. Assignment Operators.
Array types. Simple instruction. Compound education. Conditional or selection instructions. Iterative instructions. Interrupt Instructions.

Manipulation of objects
Creating an Object. Ways to assign a value to an object. Constants.
Class fields. Class Methods. Comparison between objects. Verification of membership class and introspection. The class library. Encapsulation. Polymorphism on data. Casting (on primitive data). Typecasting between objects. Conversion between types. Defining a class. Definition of methods.
The keyword this. Visibility.
Passing Parameters. Java applications. Command line arguments.
Overloading of methods . Constructors. Overriding of methods . Finalizing Methods. Calling Methods (Polymorphism).
Classes and abstract methods. Finalization (final modifier).


Computational complexity

Recursion
Factorial. Recursive Definitions of Functions. Fibonacci numbers.
Exponentiation. Binary search. Ordering a vector: quicksort algorithm. Non-recursive implementation of quicksort. The problem of the Hanoi towers.




Graphics, fonts and colors
Drawing. Text and font. Colors. Animations, pictures and sounds. Flicker. Images. Double buffering.

The Model of Events
Mouse and keyboard events.

AWT and Swing interfaces.
Basic Components: Label, Button, Check Box, Radio Button, Selection Menu, Text Fields, Panels. Component Arrangement. Focus. Events associated with components. Windows: Frames, Dialogs, File Dialog. Window Events. Menu.
Standalone graphics applications.

Exceptions
Exception protection. Declaring methods that can throw exceptions. Creating and throwing Exceptions

Output and output streams.
Abstract classes for input. Concrete input streams. Abstract filter classes. Concrete filter classes. Scanner class. Abstract classes for output. Actual output streams. Abstract filter classes. Concrete filter classes. Random Access Files.

Multithreading
Creating and using threads. Communication channels (pipes). Scheduling.
Thread Groups. Synchronization. The volatile modifier.

Network programming
Internet addresses. Connections via sockets. Server Implementation.
Client-server applications. Examples of server applications that respond simultaneously to multiple clients: Trivia and Chat.

Documentation production using Javadoc.
Condividi su