PROGRAMMAZIONE I E LABORATORIO M - Z
Academic Year 2020/2021 - 1° Year - Curriculum Elaborazione Dati e Applicazioni and Curriculum Sistemi e Applicazioni- PROGRAMMAZIONE I: Giovanni Maria FARINELLA
- LABORATORIO: Giovanni Maria FARINELLA
Taught classes: 36 hours
Exercise: 24 hours
Laboratories: 12 hours
Term / Semester: 1°
Learning Objectives
- PROGRAMMAZIONE I
The course presents fundamentals of programming computers by adopting C ++ as the reference language. In particular, basic concepts of structured programming and the OOP (Object-Oriented Programming) are introduced. Furthermore, encoding of fundamental algorithms and some OOP software design techniques are discussed.
Knowledge and understanding the primary objective of the course is the students' acquisition of the "philosophy" of the structured programming and of the OOP, as well as the detailed knowledge of the syntax and the semantics of the C++ programmig language.
The course pays particular attention to the development of well-written and well-structured code using the basic techniques for software development in the Object-Oriented paradigm.
Applying knowledge and understanding the goal of the course is to provide the tools to achieve the following skills: - Translate algorithmic ideas into code; - Design, describe and implement programs in C++; - Debug C++ programs with professional tools; - Understand simple recursive algorithms; - Analyze and describe Object-Oriented solutions using UML (Unified Language Modeling) class diagrams; - Design, implement and correctly use hierarchies of polymorphic classes and generic code; - Read, understand and analyze third-party C++ code also in terms of efficiency; - Orient yourself in the documentation of the libraries.
Making judgments: through the examination of a large number of examples of Object-Oriented programs and various practical programming sessions, the student will be able, both independently and in a cooperative form, to analyze problems and design and implement related software solutions.
Communication skills the student will acquire the necessary communication skills and expressive appropriateness in the use of technical verbal language and UML visual language in computer programming.
Learning skills the course aims to provide to the student the theoretical and practical methodologies needed in professional contexts and, in particular, the ability to formulate ad-hoc algorithms for problem solving and the opportunity to learn quickly the C++ programming language.
Should teaching be carried out in mixed mode or remotely, it may be necessary to introduce changes with respect to previous statements, in line with the programme planned and outlined in the syllabus.
Learning assessment may also be carried out on line, should the conditions require it.
- LABORATORIO
The course presents fundamentals of programming computers by adopting C ++ as the reference language. In particular, basic concepts of structured programming and the OOP (Object-Oriented Programming) are introduced. Furthermore, encoding of fundamental algorithms and some OOP software design techniques are discussed.
Knowledge and understanding the primary objective of the course is the students' acquisition of the "philosophy" of the structured programming and of the OOP, as well as the detailed knowledge of the syntax and the semantics of the C++ programmig language.
The course pays particular attention to the development of well-written and well-structured code using the basic techniques for software development in the Object-Oriented paradigm.
Applying knowledge and understanding the goal of the course is to provide the tools to achieve the following skills: - Translate algorithmic ideas into code; - Design, describe and implement programs in C++; - Debug C++ programs with professional tools; - Understand simple recursive algorithms; - Analyze and describe Object-Oriented solutions using UML (Unified Language Modeling) class diagrams; - Design, implement and correctly use hierarchies of polymorphic classes and generic code; - Read, understand and analyze third-party C++ code also in terms of efficiency; - Orient yourself in the documentation of the libraries.
Making judgments: through the examination of a large number of examples of Object-Oriented programs and various practical programming sessions, the student will be able, both independently and in a cooperative form, to analyze problems and design and implement related software solutions.
Communication skills the student will acquire the necessary communication skills and expressive appropriateness in the use of technical verbal language and UML visual language in computer programming.
Learning skills the course aims to provide to the student the theoretical and practical methodologies needed in professional contexts and, in particular, the ability to formulate ad-hoc algorithms for problem solving and the opportunity to learn quickly the C++ programming language.
Should teaching be carried out in mixed mode or remotely, it may be necessary to introduce changes with respect to previous statements, in line with the programme planned and outlined in the syllabus.
Learning assessment may also be carried out on line, should the conditions require it.
Course Structure
- PROGRAMMAZIONE I
Classrooms lessons with slides and blackboard.
- LABORATORIO
Classrooms lessons with live coding.
Detailed Course Content
- PROGRAMMAZIONE I
Part A - Fundamental of Imperative and Object Oriented Programming (3CFU)
- Introduction to programming:
- Problems; Algorithms; Flowcharts.
- Variables; Expressions; Assignments.
- Structured linear notation; Böhm-Jacopini's theorem.
- Array data structure.
- The C++ Programming language.
- Programming languages: machine, assembly and high level.
- Translation problem: compilation and interpretation.
- Installation of the compiler; First program: Editing, Compiling, Running, Debugging.
- Constructs of the language
- Data types; Predefined operators; Type conversions; I/O management.
- Flow control: if-then-else selection and switch constructs, while and do-while constructs.
- Introduction to Object Oriented Programming
- Objects: state and behavior; Classes; Instance of objects: constructors.
- Messages: structure, parameters, types of messages.
- Composition and aggregation of objects.
- Arrays and character strings
- Arrays of fundamental types and array of objects. Two-dimensional arrays.
- Iterative construct for.
- Character sequences: char arrays and string objects.
Part B - Advanced features of the C ++ language (3 CFU)- Class definition
- Class structure: attributes and operations; Access control.
- Implementation of methods: return value, parameters by value and by reference; Variables, allocation and their scope.
- C++ constructors.
- Pointers and Arrays
- Pointers; Addressing and dereferencing operators.
- Arithmetic of pointers. Pointers and arrays; Pointers as a parameter; Dynamic memory allocation.
- Function pointers; The pointer this; Multilevel addressing. References; enumerations; Unions; Bit fields.
- 2D Arrays: Arrays dynamically allocated, Arrays as parameters, Sparse Arrays; Multidimensional Arrays
- Advanced elements of the language
- The const keyword for pointers and methods; Standard arguments for function parameters. Namespace clause; Forward declarations; Inline functions.
- Implementation of the composition / aggregation relationship.
- Overloading methods; Constructors and destructors. Copy constructor.
- Functions and friend classes; Static attributes and methods.
- Management of calls to methods by activating the stack.
Module C - Object-oriented software design (3CFU)
- Inheritance
- Definition; IS-A relationship; Derivations and methods of access: protected.
- Hereditary hierarchies of classes. Methods overriding. Operator :: scope resolver.
- Initialization list and execution modalities of inherited constructors and destructors.
- Multiple inheritance. Virtual classes
- Polymorphism and abstract classes.
- Pointers to derived classes; Virtual functions; Late-binding. Polymorphism.
- Hereditary hierarchies of polymorphic classes.
- Pure virtual functions; Abstract classes; Interfaces.
- RTTI: typeid and dynamic_cast.
- Object-oriented design principles
- UML diagrams for classes.
- Design and analysis in the OOP paradigm.
- Overloading of operators.
- Type of overloading of operators: non-member, friend, member.
- Prefix and postfix operators "++" and "-".
- Overview of assignment operators "=", indexing "[]" and "()" and cast.
- I / O operators.
- Generic programming.
- Template functions and template classes.
- Introduction to programming:
- LABORATORIO
-
Basic Concepts
-
C++ Language
-
Constructs of the language C++
-
Object Oriented Programming in C++
-
Arrays and character strings in C++
-
Class definition in C++
-
Pointers and Arrays in C++
-
Advanced elements of the language C++
-
Inheritance, Polymorphism and abstract classes in C++
-
Overloading of operators in C++
- Class Template and Functions Template in C++
-
Textbook Information
- PROGRAMMAZIONE I
-
P. Deitel, H. Deitel, C++ How to Program, 10th Edition
-
Eckel, Thinking in C++, Vol. I, 2°Ed. (anche online ed in italiano)
-
Horstmann, C++ for everyone, 2°Ed. – Wiley (anche online)
-
Pohl, Object-Oriented Programming Using C++, 2° Ed. – Addison Wesley
-
Stroustrup, The C++ programming language, 3°Ed, Addison Wesley
-
- LABORATORIO
-
H.M. Deitel, P. J. Deitel, C++ Fondamenti di programmazione – Maggioli Editore (2014).
-
Eckel, Thinking in C++, Vol. I, 2°Ed. (disponibile gratuitamente online)
-
Horstmann, C++ for everyone, 2°Ed. – Wiley
-
Stroustrup, Programming: Principles and Practice Using C++. (Addison-Wesley ISBN 978-0321-992789, http://www.stroustrup.com/programming.html).
-
Stroustrup, The C++ Programming Language - 4th Edition ( Addison-Wesley ISBN 978-0321563842, http://www.stroustrup.com/4th.html )
-