Original code:
#include
#include
class TrainComposition { public: void attachWagonFromLeft(int wagonId) { throw std::logic_error("Waiting to be implemented"); } void attachWagonFromRight(int wagonId) { throw std::logic_error("Waiting to be implemented"); } int detachWagonFromLeft() { throw std::logic_error("Waiting to be implemented"); } int detachWagonFromRight() { throw std::logic_error("Waiting to be implemented"); } }; #ifndef RunTests int main() { TrainComposition tree; tree.attachWagonFromLeft(7); tree.attachWagonFromLeft(13); std::cout << tree.detachWagonFromRight() << "\n"; // 7 std::cout << tree.detachWagonFromLeft(); // 13 } #endif
Dashboard
Start Trial
Sign In
Home
Product
Features
Use Cases
Customers
ROI Calculator
Integrations
Assessments
Tests
Questions
Pricing
Resources
Book: Evidence-Based Hiring
Blog
Support
Contact Us
Legal
For Jobseekers
© TestDome, 2024.