Skip to content

Latest commit

 

History

History
62 lines (42 loc) · 1.29 KB

File metadata and controls

62 lines (42 loc) · 1.29 KB

C++ Module 02

This module focuses on ad-hoc polymorphism, operator overloading, and the Orthodox Canonical class form in C++. You will build a fixed-point number class and expand it with arithmetic operations, comparisons, and geometric usage.


🛠️ Usage

For each exercise, navigate to its folder, compile, and run:

📂 ex00

cd ex00
make
./fixed

📂 ex01

cd ex01
make
./fixedUseful

📂 ex02

cd ex02
make
./fixedOperators

📂 ex03

cd ex03
make
./bsp

📝 Exercise Descriptions

ex00 — My First Class in Orthodox Canonical Form: Build a Fixed class with raw value handling, canonical form methods, and debug messages.

ex01 — Towards a More Useful Fixed-Point Number Class: Add int and float constructors, conversions, and an insertion (<<) operator.

ex02 — Now We’re Talking: Add comparison, arithmetic, increment/decrement operators, plus static min/max functions.

ex03 — BSP: Use the Fixed class in geometric computations to check if a point is inside a triangle.

💼 Connect

If you have any questions or suggestions, feel free to connect: 🔗 LinkedIn: Valentina Nguyen 🙋‍♀️

🖥️ System Compatibility

This project was developed and tested on Linux (Ubuntu).