Back
ExamFull examExam paper only

05 09 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 Tamburri Date: 05-09-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 Tamburri Date: 05-09-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 Tamburri Date: 05-09-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 (12 points) PoliMi has initiated a new collaboration with the National Astronomical Observatory and requires you to implement a planetarium management system—PoliStars—where you can manage celestial bodies and their relationships while they move on a 2D plane. In particular, the trajectory of a celestial body is a collection of 2D coordinates, each representing its position at a certain time instant. You can assume these collections to all have the same length since they cover a fixed time window. Moreover, a planet and a star shall be linked if the planet orbits the star. Use shared pointers to manage the memory of the celestial bodies. Use STL containers to store the stars and planets. The system is structured as follows: • the CelestialBody base class represents a generic celestial body with virtual methods for displaying and getting the name (i.e., astd::string), mass (i.e., adouble), and trajectory (i.e., a vector of…

Preview

First page of the document.

First page: 05 09 2024 E TS