


Virtual std::unique_ptr createStopWatch(int stopWatchXPos = 0, int stopWatchYPos = 0) const override Virtual std::unique_ptr createStopWatch(int stopWatchXPos = 0, int stopWatchYPos = 0) const = 0 Ĭlass DigitalStopWatchFactory final : public Factory Void set(Digit digArr, int startIndex, int unit) Void printDigitAtLoc(Digit digArr, int index, int x, int y) const
ALL THAT REMAINS 1 WALKTHROUGH APP WRAPPER CODE
The code will later be used in a console game, and the format of the std::tm struct is easy to work with.Īlso, note that the way I wrote the tests in source.cpp will result in a small visual bug from time to time to resolve it lower the waiting time inside of the do while loop from std::chrono::seconds(1) to std::chrono::milliseconds(250) and increase the value of timer, the following action will increase the refresh rate.ĮDIT: Note that this question is a followup to Watch that uses the abstract factory design pattern they both use the same Console, Constants and Digits library but both accomplish a different taskĬlass DigitalStopWatch final : public StopWatchĬlass SegmentedStopWatch final : public StopWatchĮxplicit SegmentedStopWatch(int x, int y) Note: I used ctime instead of chrono because this is not meant for benchmarking. I have wrote code for a stopwatch that utilizes the abstract design pattern and would like to get some feedback on the code, so be as harsh as you can.
