My C++ class taught for a person with solid Python background
mr-s-mirzoev / cpp-lessons Goto Github PK
View Code? Open in Web Editor NEWMy C++ class taught for a person with solid Python background
License: MIT License
My C++ class taught for a person with solid Python background
License: MIT License
For this task, please implement a long number calculator. That includes the fully operable long number with all the same operations as the int
type.
class LongNumber
{
// ...
public:
operator int() const;
LongNumber& operator++();
LongNumber operator++(int);
LongNumber& operator--();
LongNumber operator--(int);
LongNumber& operator+=(LongNumber const& rhs);
LongNumber& operator-=(LongNumber const& rhs);
LongNumber& operator*=(LongNumber const& rhs);
LongNumber& operator/=(LongNumber const& rhs);
int operator<=>(LongNumber& rhs);
friend istream& operator>>(istream&, LongNumber const&);
friend ostream& operator<<(ostream&, LongNumber const&);
// ...
}
There are two common ways for use of data storage under the hood, each has it's pros and cons. I "forced" you to use the int representation, however the easier option would be to implement it using a character string, which would then simply store a 10 - base representation of the number. Since we haven't departed too far with the implementation, we can switch to that as I don't want to overcomplicate the implementation for you. That would harm the learning process.
Dear Alek! As for the 3rd project, I'd like you to implement the HashTable class as your next assignment.
That would help you better understand templates, OOP and STL and move semantics
. That's a very applied problem which is inspired by industry tasks.
Feel free to ask any questions you have here and during our sessions. Just to let you know, I already finished this practical myself, but it could be better and is simply a sketch of the solution. So you should look there only for inspiration, not an answer immediately.
Initially, I thought about giving it to you as Practical 2, but I have a better idea.
Let me know how that sounds to you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.