summaryrefslogtreecommitdiff
path: root/DSALib/Auxiliary/Calculator/Argument.cs
diff options
context:
space:
mode:
authoruzvkl <dennis.kobert@student.kit.edu>2019-06-11 23:05:52 +0200
committeruzvkl <dennis.kobert@student.kit.edu>2019-06-11 23:05:52 +0200
commite6181c24124d97f2fbc932b8a68311e625463156 (patch)
treec1f097c344ca266b7941c9668590b0fd35c7870a /DSALib/Auxiliary/Calculator/Argument.cs
parent2490ad5d31fe2ac778ff9303776f0e91f47a2862 (diff)
Move dsa related stuff to subfolder
Diffstat (limited to 'DSALib/Auxiliary/Calculator/Argument.cs')
-rw-r--r--DSALib/Auxiliary/Calculator/Argument.cs35
1 files changed, 0 insertions, 35 deletions
diff --git a/DSALib/Auxiliary/Calculator/Argument.cs b/DSALib/Auxiliary/Calculator/Argument.cs
deleted file mode 100644
index e681377..0000000
--- a/DSALib/Auxiliary/Calculator/Argument.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using System;
-
-namespace DSALib.Auxiliary.Calculator
-{
- /// <summary>
- /// Provides an ISolvable class to save numbers. The class handles Argument checking and conversion from string to int.
- /// </summary>
- public class Argument : ISolvable
- {
- private readonly int value;
-
- public Argument(string value)
- {
- // check whether the value given is an empty string
- if (string.IsNullOrEmpty(value))
- throw new ArgumentException("Argument kann nicht mit einem leeren string instanziert werden. ",
- nameof(value));
-
- if (!int.TryParse(value, out var result))
- throw new ArgumentException($"Kann {value} nicht in Integer konvertieren");
-
- this.value = result;
- }
-
- public int Solve()
- {
- return value;
- }
-
- public override string ToString()
- {
- return value.ToString();
- }
- }
-} \ No newline at end of file