Back
ExamFull examExam paper only

21 06 2024 E TS

Full exam for Algorithms and parallel computing in the Mathematical Engineering degree programme at Politecnico di Milano. The document covers: Algorithms and Parallel Computing Course 052496 Prof. Danilo Ardagna, Prof. Damian Andrew Tamburri Date: 21-06-2024 Last Name: ............................................................. First Name: ............................................................. Student ID:

Algorithms and parallel computingFull exam

Document information

What's included in this study material

Full exam for Algorithms and parallel computing in the Mathematical Engineering degree programme at Politecnico di Milano. The document covers: Algorithms and Parallel Computing Course 052496 Prof. Danilo Ardagna, Prof. Damian Andrew Tamburri Date: 21-06-2024 Last Name: ............................................................. First Name: ............................................................. Student ID:

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

Algorithms and Parallel Computing Course 052496 Prof. Danilo Ardagna, Prof. Damian Andrew Tamburri Date: 21-06-2024 Last Name: ............................................................. First Name: ............................................................. Student ID: ............................................................. Signature: ............................................................... Exam duration: 2 hours and 30 minutes Students can use a pen or a pencil for answering questions. Students are NOT permitted to use books, course notes, calculators, mobile phones, and similar connected devices. Students are NOT permitted to copy anyone else’s answers, pass notes amongst themselves, or engage in other forms of misconduct at any time during the exam. Writing on the cheat sheet is NOT allowed. Exercise 1: Exercise 2: Exercise 3: Exercise 1 (15 points) You have to work on a program implementing a railway infrastructure for the simulation of passenger flows: its key elements shall be timetables, trains, and stations. In particular, the structure contains contains five main classes: Time, TimeProfile, Train, Station, RailwayNetwork. We describe these classes in the following, and represent their structure in the class diagram of Figure 1. The Time class is used to represent time intervals and time differences (e.g., 0 hours and 8 minutes), as well as arrival and departure clock times (e.g., 18:25). Its constructor andoperator+ method perform the necessary conversions to ensure that these time representations are always appropriate, i.e., that the number of minutes is smaller than 60 (you can assume thatTime objects never surpass the 24-hours threshold). Its total_minutes method returns the corresponding value converted to minutes; for example, for 1…

Preview

First page of the document.

First page: 21 06 2024 E TS