26
26
*/
27
27
namespace greedy_algorithms {
28
28
/* *
29
- * A class to perform binary addition of two binary strings.
29
+ * @brief A class to perform binary addition of two binary strings.
30
30
*/
31
31
class BinaryAddition {
32
32
public:
33
33
/* *
34
- * Adds two binary strings and returns the result as a binary string.
35
- *
34
+ * @brief Adds two binary strings and returns the result as a binary string.
36
35
* @param a The first binary string.
37
36
* @param b The second binary string.
38
37
* @return The sum of the two binary strings as a binary string, or an empty
@@ -69,7 +68,7 @@ class BinaryAddition {
69
68
70
69
private:
71
70
/* *
72
- * Validates whether a string contains only binary characters (0 or 1).
71
+ * @brief Validates whether a string contains only binary characters (0 or 1).
73
72
* @param str The string to validate.
74
73
* @return true if the string is binary, false otherwise.
75
74
*/
@@ -81,7 +80,7 @@ class BinaryAddition {
81
80
} // namespace greedy_algorithms
82
81
83
82
/* *
84
- * Function to run tests for the addBinary method.
83
+ * @brief Function to run tests for the addBinary method.
85
84
*/
86
85
void tests () {
87
86
greedy_algorithms::BinaryAddition binaryAddition;
@@ -110,10 +109,9 @@ void tests() {
110
109
}
111
110
112
111
/* *
113
- * Main function to execute the program.
112
+ * @brief main function
114
113
*/
115
114
int main () {
116
- tests ();
117
- std::cout << " All tests passed.\n " ;
115
+ tests (); // / To execute tests
118
116
return 0 ;
119
117
}
0 commit comments