Category Chapter 09 – Principles and Practice Using C++

money class 1.2

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 9 Exercise 16 Using std_lib_facilities.h by Bjarne Stroustrup. [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PPP // Chapter 9 Exercise 16 #include "std_lib_facilities.h" enum currency { USD, EUR, GBP }; class Money…

money class 1.1

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 9 Exercise 15 Using std_lib_facilities.h by Bjarne Stroustrup. [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PPP // Chapter 9 Exercise 15 #include "std_lib_facilities.h" enum currency { USD, EUR, GBP }; ostream &…

money class 1.0

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 9 Exercise 14 Using std_lib_facilities.h by Bjarne Stroustrup. [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PPP // Chapter 9 Exercise 14 #include "std_lib_facilities.h" class Money { private: long int amount; public: //constructors…

rational number class

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 9 Exercise 13 Using std_lib_facilities.h by Bjarne Stroustrup. [code language=”cpp”] // Philipp Siedler // Bjarne Stroustrup’s PPP // Chapter 9 Exercise 13 #include "std_lib_facilities.h" //find greatest common denominator int find_gcd(int a, int b)…

book class 1.0

Bjarne Stroustrup “Programming Principles and Practice Using C++” Chapter 9 Exercise 5 Using std_lib_facilities.h by Bjarne Stroustrup. Using Chrono.h and Chrono.cpp by Bjarne Stroustrup, including the Chrono.h header file and the Chrono.cpp source file. Chrono is an extensive date class used in this exercise.…