Git Product home page Git Product logo

cpp-lessons's Introduction

cpp-lessons

My C++ class taught for a person with solid Python background

cpp-lessons's People

Contributors

mr-s-mirzoev avatar

Watchers

James Cloos avatar  avatar  avatar

cpp-lessons's Issues

Hometask 2 | Implement Long Numbers

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.

@mamedxanli

Hometask 3 | Implement HashTable class

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.