The testing process: Implementing code or fixing bugs in C++.
Motivation: Basic familiarity with the programming language used on the job is a prerequisite for quickly getting up to speed.
The testing process: Implementing object-oriented programming concepts.
Motivation: Objective paradigm provides good methods for structuring code, making that paradigm very common in modern programming.
User interface contains two types of user input controls: TextInput, which accepts all characters and NumericInput, which accepts only digits.
Implement the following methods:
- add on class TextInput - adds the given character to the current value
- getValue on class TextInput - returns the current value
- add on class NumericInput - overrides the base class method so that each non-numeric character is ignored
For example, the following code should output "10":
TextInput* input = new NumericInput(); input->add('1'); input->add('a'); input->add('0'); std::cout << input->getValue();
- Example case: Exception
- Adding various characters to TextInput: Exception
- Adding various characters to NumericInput: Exception