/Safe_Integer_Class_Cpp

A custom-made simple data type for c++ , used as helper class for safe numerical input on console

Primary LanguageC++

Safe_Integer_Class_C++

General idea

Aim to create a helper C++ class to be used in my college programming courses "console" assigments and projects


Technique

Make use of this class instead of primitive integer in order to force console user to enter valid integer value or give chance until providing valid integer value , to avoid console crash or solve by throwing exception and close console => more flexible way to test codes with TA's during discussion regardless any bad input :)


Motivation

The idea come from my disscusion with my oop course Prof. about is there any ready-made way in c++ to gurantee code safely handle unexpected inputs like execptions and also provides flexiblity for testing and TA's use during disscusion , she suggest to make my own way of handling this and make use of it along course projects.


Version 1.0 done during my OOP course in FCAI-CU fall 2021 David George.