Documented Square

This commit is contained in:
Lukasz Baldyga committed 2020-11-03 13:05:58 +00:00
1 parent 243c955b2a
commit 4441f441c0
1 file changed
+22 -2
@@ -5,20 +5,40 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Advanced_Software_Engineering.Verbs.DrawingVerbs { namespace Advanced_Software_Engineering.Verbs.DrawingVerbs {
class Square : Verb { /// <summary>
/// The Square Verb class
/// </summary>
public class Square : Verb {
Verb verb; Verb verb;
/// <summary>
/// A new Squre instance. Draws squares using <see cref="RegularPolygon"/>
/// </summary>
/// <param name="drawer">drawer</param>
/// <param name="scale">size of the square</param>
public Square(Drawer drawer, double scale) { public Square(Drawer drawer, double scale) {
verb = new RegularPolygon(drawer, 4, scale); verb = new RegularPolygon(drawer, 4, scale);
} }
/// <summary>
/// A new Squre instance. Draws squares using <see cref="RegularPolygon"/>
/// </summary>
/// <param name="drawer">drawer</param>
/// <param name="scale">size of the square</param>
/// <param name="offset">rotation offset in degrees</param>
public Square(Drawer drawer, double scale, double offset) { public Square(Drawer drawer, double scale, double offset) {
verb = new RegularPolygon(drawer, 4, scale, offset); verb = new RegularPolygon(drawer, 4, scale, offset);
} }
/// <summary>
/// Draws the regular polygon (square)
/// </summary>
public void ExecuteVerb() => verb.ExecuteVerb(); public void ExecuteVerb() => verb.ExecuteVerb();
/// <summary>
/// Gets description of how it will draw the regular polygon (square)
/// </summary>
/// <returns></returns>
public string GetDescription() => verb.GetDescription(); public string GetDescription() => verb.GetDescription();
} }
} }