Abdelrahman Mohamed's Projects
Config files for my GitHub profile.
Problem 1 [25 points] Different variations of types int and float exist in C++ and other languages. They are usually limited by minimum and maximum values. Sometimes it is desired to have versions of these types with unlimited bounds. Java solves this problem by providing BigInteger and BigDecimal classes. In this problem it is required to develop a new C++ type (class) that can hold unlimited decimal integer values and performs arithmetic operations on them. You will develop in C++ a class, BigInt that supports writing statements with extremely long integer values like these: BigInt num1("123456789012345678901234567890"); BigInt num2("113456789011345678901134567890"); BigInt num3 = num2 + num1; cout << "num1 = " << num1 << endl; CS214 β CAIRO UNIVERSITY - FCI β DATA STRUCTURES - 2022 / ASSIGNMENT 1 2 | P a g e cout << "num2 = " << num2 << endl; //236913578023691357802369135780 cout << "num2 + num1 = " << num3 << endl; Your task is: (1) Design the class BigInt that has the following public interface (set of operations available to use by developers using the class): [18 points, 3 points for each function] BigInt (string decStr); // Initialize from string and rejects bad input BigInt (int decInt); // Initialize from integer BigInt operator+ (BigInt anotherDec); BigInt operator= (BigInt anotherDec); Int size(); You will also need to overwrite the << operator as follows: friend ostream& operator << (ostream& out, BigInt b) Using data encapsulation, you are free to store the digits of the big decimal integer in whatever container you like. You might store them in an array, a vector, a string or whatever. These are details that are not important to the user of your class. You will need to build + and β operations that work on the representation you chose. (2) Implement the class BigInt and write five test cases (including βve numbers) to test it. Implement a program that runs the test cases and verifies the result. [7 points, 2 for each test case and 2 for the class] (3) Name a folder βA1_P1_ID1_ID2β and put your files inside it (even if itβs only one file)
Implementation for some problems
DS Algo + solutions
LZ77,LZW,Standard Huffman,Arithmetic Coding(Binary),Vector_Quantization
My Implementation For Design Pattern
Task For OOP
Competitive programming