This commit is contained in:
2022-04-29 11:55:26 +02:00
parent 61562e1081
commit cd5d88c998
17 changed files with 16 additions and 0 deletions

View File

@@ -7,11 +7,20 @@ using System.Threading.Tasks;
namespace Negyszog {
public class Negyszog {
public double oldal { get; set; }
public double oszlop;
public Negyszog(double oldal) {
this.oldal = oldal;
}
public void getOszlop(double oszlop) {
if(oszlop <= 0) {
throw new ArgumentException("A magasság negativ!");
} else {
this.oszlop = oszlop;
}
}
public double Kerulet() {
return 4.0 * oldal;
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.