Private
Public Access
Added better constructor
This commit is contained in:
1 parent
3ac8d5b28d
commit
e49732b1c5
1 file changed
+10
-1
+10
-1
@@ -1,7 +1,7 @@
|
|||||||
using Advanced_Software_Engineering.Verbs.Value.ValueTypes;
|
using Advanced_Software_Engineering.Verbs.Value.ValueTypes;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
|
||||||
namespace Advanced_Software_Engineering.Verbs.Value.Value_Objects {
|
namespace Advanced_Software_Engineering.Verbs.Value.ValueObjects {
|
||||||
|
|
||||||
public class PointValue {
|
public class PointValue {
|
||||||
private IValue x;
|
private IValue x;
|
||||||
@@ -17,6 +17,11 @@ namespace Advanced_Software_Engineering.Verbs.Value.Value_Objects {
|
|||||||
this.y = y;
|
this.y = y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public PointValue(string parameter1, string parameter2) {
|
||||||
|
x = ValueFactory.CreateValue(parameter1, "int");
|
||||||
|
y = ValueFactory.CreateValue(parameter2, "int");
|
||||||
|
}
|
||||||
|
|
||||||
public int GetX() {
|
public int GetX() {
|
||||||
return x.ToInt();
|
return x.ToInt();
|
||||||
}
|
}
|
||||||
@@ -24,5 +29,9 @@ namespace Advanced_Software_Engineering.Verbs.Value.Value_Objects {
|
|||||||
public int GetY() {
|
public int GetY() {
|
||||||
return y.ToInt();
|
return y.ToInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Point GetPoint() {
|
||||||
|
return new Point(GetX(), GetY());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user