FUNDAMENTALS OF PROGRAMMING B
cod. 1000749

Academic year 2014/15
1° year of course - Second semester
Professor
Gianfranco ROSSI
Academic discipline
Informatica (INF/01)
Field
Discipline informatiche
Type of training activity
Characterising
72 hours
of face-to-face activities
9 credits
hub: PARMA
course unit
in - - -

Learning objectives

The course aims to provide the student with the basic knowledge for the design and implementation of "object-oriented" programs, as well as in-depth knowledge about the programming tools provided by C++ and Java for "object-oriented" programming.
 
The course also aims to provide students with the ability to apply the acquired problem analysis techniques and knowledge about programming tools to carry out concrete executable C++ and Java programs.

Prerequisites

The concepts and basic techniques of imperative programming as provided by Foundamentals of Programming A.

Course unit content

The course introduces the fundamentals of the "object-oriented" and modular programming paradigms, using as the main reference the C++ language, but also taking into account the Java language in the final part of the course.

The course also presents some advanced constructs and mechanisms of C++ and Java, such as function and operator overloading and exception handling, as well as some notions and tools that are not strictly related to the "object-oriented" programming paradigm, but which are nevertheless of great importance, such as the notions of abstract data type and the software development cycle.

Full programme

Class and object declaration. Accessing member functions and data of a class. Class constructors. Abstract data types (ADT).
A sample class: 'rational'
Function and operator overloading.
The 'string' class.
Dynamic memory allocation. A sample class: 'int_vett'. The assignment operator. The copy constructor. Class destructors. Object life-time.

Exception handling: motivations. Constructs for exception handling in C++.
Parametric classes ('template'): declaration, instantiation. A sample class: 'vett<T>' - Parametric functions.
Inheritance. 'public' vs 'private' derivation. Multiple inheritance (hints).

Introduction to Java. Features and components. Interpretation vs compilation. The Java Virtual Machine. Structure of a Java program.
Simple primitive types. Basic I/O. Control stuctures.
Structured types: arrays. References and objects. Garbage collection. Strings. Static methods. Parameter passing.
The 'class' construct. Declaration and instantiation. Example: class 'Rational'.
Inheritance. Example: classes 'Rectangle' and 'Square'. References 'this' and 'super'. Polymorphism. Substitution principle and "down-casting". Classe hierarchy (class java.lang.Object).
"Wrapper" types.
Interfaces and implementations. Interfaces and inheritance.
Graphic Interface (GUI) in Java. AWT and Swing. Windows (class 'JFrame'). Layout Manager. Panels (class 'JPanel'). Events and Listener. Interface 'ActionListener'.

Bibliography

- L.J. Aguilar. Fondamenti di programmazione in C++ , McGraw-Hill, 2008.

- C.S. Horstmann , Concetti di informatica e fondamenti di Java, Apogeo, 2010.

- M.Cadoli, M.Lenzerini, P.Naggar, A.Schaerf. Fondamenti della progettazione di programmi. Principi, tecniche e loro applicazioni in C++, CittaStudiEdizioni di UTET Libreria, 1997.

- C++ and Java programs shown in class and in the laboratory, available on the Web at http://people.math.unipr.it/gianfranco.rossi/Teaching/FondProgr/EsempiLezioneParteB/index.html e http://lea.unipr.it/course/view.php?id=324

Teaching methods

Teaching takes place mainly through lectures and computer-based exercises, either assisted orcarried out independently by the students.

The lectures provide, among other, the presentation of a number of practical examples, along with the related solutions written in C++ and Java, which will be made available on the Web site of the course (at http://people.math.unipr .com/gianfranco.rossi/Teaching/FondProgr/EsempiLezioneParteB/).
 
The exercises provide the assignment, every week, of one or more exercises related to the topics covered in class- The student will have to solve the exercises independently and deliver solutions within a week, using the Parmma University e-learning platform LEA (http://lea.unipr.it/course/view.php?id=324). The platform allows, among others, the teacher to monitor the delivery of the exercises carried out by students and to provide suggestions for their implementation.

Phisical meetings with the teacher are scheduled, on a weekly basis, for all students who have difficulties in achieving the assigned exercises.

Assessment methods and criteria

The final examination of the course consists of a practical test and an oral test.

The practical test consists in the solution (on the PC, in the Laboratory of the Department of Mathematics and Computer Science) of some programming exercises, using the "Object-Oriented" features of C++, presented during the course.

The oral test consists of some questions (usually three or four) on the most basic and general topics treated throughout the course.

For students of the Degree in Computer Science, the exam test is integrated with that of the course Fundamentals of Programming A, which includes a written test and an oral test. The written test consists in the solution (on paper) of some programming exercises, using the imperative fragment of C++ presented at Fundamentals of Programming A.

For each of the tests (written, practical and oral) is given a mark out of thirty. The tests are considered valid if the vote is greater than or equal to 165/30. The exam is passed if all tests that constitute it are valid and the final grade is greater than or equal to 18/30. The final grade is calculated as the average of the marks obtained in each test.

Other information

The course includes its own Web page for all general information, managed directly by the teacher (http://people.math.unipr.it/gianfranco.rossi/Teaching/FondProgr/index.html), and a page on the University of Parma Web Learning System for the management of exercises (http://lea.unipr.it/course/view.php?id=324).

2030 agenda goals for sustainable development

- - -