Back
ExercisesComplete set

Esempi di esercizi C

Complete course materials for Principles of Programming Languages in the Computer Engineering degree programme at Politecnico di Milano. The document covers: C++ Workbook Ettore Speziale In the following sections you can found some assignments, each related to a particular aspect of the C++ language. The assignments are more or less of the same difficulty of the ones you are required to solve during the exam. 1 Object Oriented The

Principles of Programming LanguagesComplete set

Document information

What's included in this study material

Complete course materials for Principles of Programming Languages in the Computer Engineering degree programme at Politecnico di Milano. The document covers: C++ Workbook Ettore Speziale In the following sections you can found some assignments, each related to a particular aspect of the C++ language. The assignments are more or less of the same difficulty of the ones you are required to solve during the exam. 1 Object Oriented The

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

C++ Workbook Ettore Speziale In the following sections you can found some assignments, each related to a particular aspect of the C++ language. The assignments are more or less of the same difficulty of the ones you are required to solve during the exam. 1 Object Oriented The Scrooge McDuck corporation needs to continuously observe the stock market in or- der to compete with other rival corporations. Data for stock market analysis is provided by the Huey, Dewey, and Louie Inc., that asks 1000$ for each access to data. Due to is greed, Scrooge McDuck does not want to pay 1000$ too many times, so he assign you the design of a new stock market analysis tool: • when a new analysis is needed, a command containing analysis code is sent to the analysis server • the analysis server buffers commands, until a fixed threshold is reached • at that point, a command representing all pending analysis is built, and sent to Huey, Dewey, and Louie Inc., thus allowing to pay its fee only once • a special command forcing the execution of all pending analysis can be sent to the analysis server You are required to sketch the solution of the problem using C++. 2 Operator Overloading The Orion Crew Exploration Vehicle is a new manned aircraft being built by NASA to replace the Shuttle Space Transportation System. It is equipped with state of the art computers in order to increase the aircraft reliability. The implementation of the flight-control systems has been commissioned to your com- pany. You are in charge of providing a software-based fault-tolerant implementation of single precision floating point arithmetic to be used by software running on flight-control CPUs. Your boss asks you to sketch an initial version of the library with the following features: 1 • the base data type is a floating…

Preview

First page of the document.

First page: Esempi di esercizi C