Back
ExamFull examExam paper only

13 02 17

Full exam for Software Engineering 2 in the Computer Engineering degree programme at Politecnico di Milano. The document covers: Dipartimento di Elettronica, Informazione e Bioingegneria Politecnico di Milano Prof. Elisabetta Di Nitto, Luca Mottola 20133 Milano (Italia) Piazza Leonardo da Vinci, 32 Tel. (39) 02-­2399.3400 Fax (39) 02-­2399.3411 Software Engineering II February 13 2017 Last Name First Name

Software Engineering 2Full exam

Document information

What's included in this study material

Full exam for Software Engineering 2 in the Computer Engineering degree programme at Politecnico di Milano. The document covers: Dipartimento di Elettronica, Informazione e Bioingegneria Politecnico di Milano Prof. Elisabetta Di Nitto, Luca Mottola 20133 Milano (Italia) Piazza Leonardo da Vinci, 32 Tel. (39) 02-­2399.3400 Fax (39) 02-­2399.3411 Software Engineering II February 13 2017 Last Name First Name

Import quality: text was extracted directly from the original document.

Extracted content from the document

Representative passages recognised in different parts of the material. The full extracted text remains available to search, while this compact preview makes the page easier to read.

Page 1

Dipartimento di Elettronica, Informazione e Bioingegneria Politecnico di Milano Prof. Elisabetta Di Nitto, Luca Mottola 20133 Milano (Italia) Piazza Leonardo da Vinci, 32 Tel. (39) 02-­2399.3400 Fax (39) 02-­2399.3411 Software Engineering II February 13 2017 Last Name First Name Id number (Matricola) Note 1. The exam is not valid if you don’t fill in the above data. 2. Write your answers on these pages. Extra sheets will be ignored. You m ay use a pencil. 3. The use of any electronic apparatus (computer, cell phone, camera, etc.) is strictly forbidden. 4. You cannot keep a copy of the exam w hen you leave the room . 2 Question 1 Alloy (7 points) Consider construction cubes of three different sizes, small, medium, and large. You can build towers by piling up these cubes one on top of the other respecting the following rules: • A large cube can be piled only on top of another large cube • A medium cube can be piled on top of a large or a medium cube • A small cube can be piled on top of any other cube • It is not possible to have two cubes, A and B, simultaneously positioned right on top of the same other cube C Question 1: Model in Alloy the concept of cube and the piling constraints defined above. Question 2: Model also the predicate canPileUp that, given two cubes, is true if the first can be piled on top of the second and false otherwise. Question 3: Consider now the possibility of finishing towers with a top component having a shape that prevents further piling, for instance, a pyramidal or semispherical shape. This top component can only be the last one of a tower, in other words, it cannot have any other component piled on it. Rework your model to include also this component. You do not need to consider a specific shape for it, but only its property of not…

Preview

First page of the document.

First page: 13 02 17