My solutions to the four assignments of an introductory C++ course: control flow, number theory, string processing, operator overloading, a tokenizing complex-number calculator, Fourier and Taylor series, recursion, and a polynomial class.
Course: Basic Programming (Dr. Amir Jahanshahi), Amirkabir University of Technology. The problem sets are in Persian (Farsi). The code and reports show the C++ solutions.
| # | Folder | Topics |
|---|---|---|
| 1 | 01-basics-and-control-flow |
Arithmetic and control structures, triangle area and vertex orientation (clockwise or counter-clockwise), primality tests, digit manipulation. |
| 2 | 02-primes-and-strings |
Primes and "super primes", e-mail format validation, palindromes, random numbers with a frequency histogram. |
| 3 | 03-complex-calculator-fourier |
An interactive complex-number calculator with a token stream and variables (Q1); a Fourier-series approximation of a periodic signal compared with its true values (Q2). |
| 4 | 04-recursion-and-polynomials |
Recursive combinations, GCD, logarithm and Taylor-series sine (Q1); a Polynomial class with addition, subtraction, differentiation and integration (Q2). |
Each folder contains problem-set.pdf (the assignment), report.pdf (my write-up), and one sub-folder per question (Q1/, Q2/, …).
Each question is a stand-alone program:
cd 03-complex-calculator-fourier/Q1
g++ -std=c++17 *.cpp -o calculator && ./calculatorB. Stroustrup, Programming: Principles and Practice Using C++, 2nd ed., Addison-Wesley, 2014. This is the course textbook. The token-stream calculator in assignment 3 follows its design.
Mohammad Javad Amin · GitHub