The course aims to teach students the concepts of object-oriented programming with particular attention to the C# programming language. Methods will be introduced for architectural design and implementation of complex software systems. The course will give few hints of Agile Programming and Design Patterns through real examples. The student will learn to design and implement concurrent and distributed (service-oriented programming, web services) software systems.
During the first part of the course students will learn the theoretical basis of concurrent versioning systems for software development and to properly use the Git system. Students who have followed the course with profit will be able to develop programs and libraries by using the C# programming language and in particular will have the knowledge to: create and use variables, write and read from the console, write and use conditional statements, cycles and arrays, create and use objects and their methods. Through specific exercises, the students will focus on the use of the constructors, variables and static methods, namespaces, exceptions and strings. He/she will also be able to create new classes, structures, enums with the use of generics. The course explains techniques for reading and writing files, linear data structures, trees, graphs, hash sets and maps. The student will learn the basic concepts of object-oriented programming, interfaces, encapsulation, polymorphism. The details of the delegates and events will be described, together with some design patterns (observer, enumerator), extension methods, anonymous types, lambda expressions and LINQ. In the last part of the course, students will learn to implement simple user interfaces with Windows Forms and web services with Windows communication framework.
Lessons alternate theoretical explanations with practical exercises. The theoretical explanations are frequently illustrated with the analysis, execution and debugging of code snippets directly on the teacher's PC. All material seen in class (slides and practical examples) is shared through AulaWeb platform. A forum is activated on the same platform where students can interact directly with the teacher asking questions of public interest. During the course, students are offered a number of practical exercises to be delivered according to a precise schedule using the GitHub site. Upon reaching 80% of exercises correctly done and delivered as required, the student is entitled to bonus points on the final grade.
Introduction
Versioning
Git as a tool for version control
Git: use of remote repository, branching and merging
Local and distributed workflow, remote branch, rebasing and stashing
Introduction to the Object Oriented Programming and C# - .NET framework
Primitive types and variables in C#
Console I/O, conditional statements
Loops and arrays in C#
Unit testing
Methods, creation and use of objects in C#
Builders, variables and static methods, namespaces
Exceptions and strings in C#
Defining classes in C#: member variables, methods, constructors, properties, structures, enum, generic classes
Reading and writing files, linear data structures
Trees, graphs, hash sets and maps
Basic Concepts Object Oriented Programming with applications to C#
Interfaces
Encapsulation, polymorphism, cohesion and coupling
Destructors, overloaded operators, enumerators
Delegates, events and observer design pattern; extension methods, anonymous types
Lambda expressions, LINQ, GUI development with Windows Forms
Web services and WCF
Course slides
Robert C. Martin and Micah Martin. 2006. Agile Principles, Patterns, and Practices in C# (Robert C. Martin). Prentice Hall PTR, Upper Saddle River, NJ, USA.
Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. 1995. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA.
Joseph Albahari and Ben Albahari. C# 5.0 in a Nutshell: The Definitive Reference. O'Reilly Media; Fifth Edition edition (June 26, 2012)
Jennifer Greene and Andrew Stellman. Head First C#. O'Reilly Media; 3 edition (September 16, 2013)
Ricevimento: On appointment
LUCIO MARCENARO (President)
CARLO REGAZZONI (President)
The start of classes is scheduled as the official calendar of the Polytechnic School
LABORATORY OF INFORMATICS AND TELEMATICS
The exam is held on the dates in the official calendar from 9 AM to 1 PM. Students who take a final exam will have to answer a test with 62 multiple choice questions (1h30m time limit) and set up a complex software project with a test driven approach. This second part of the exam can be made in pairs.
Through the course some exercises are presented, divided into blocks whose themes are aligned with the topics of the theoretical part. Students attending the course can do the exercises and load the corresponding source code in a specific repository on GitHub, following a schedule table that is communicated during the first lesson of the course. The teacher evaluates the exercises completed on time suggesting possible fixes and code improvements. Students who at the end of the year have carried out correctly at least 80% of the proposed exercises are entitled to a bonus on the final grade.