You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
819 B
C#
39 lines
819 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Übungen_LF6_WinFormanwendung
|
|
{
|
|
class Rechteck
|
|
{
|
|
//Eigenschaften
|
|
public double breite { get; set; }
|
|
public double hoehe { get; set; }
|
|
public double x { get; set; }
|
|
public double y { get; set; }
|
|
|
|
|
|
//Worker
|
|
public double berechneUmfang()
|
|
{
|
|
double umfang = 2 * x + 2 * y;
|
|
return umfang;
|
|
}
|
|
|
|
public double berechneFlaeche(double a, double b)
|
|
{
|
|
double flaeche = x * y;
|
|
return flaeche;
|
|
}
|
|
|
|
//Konstruktoren
|
|
public Rechteck()
|
|
{
|
|
x = 0;
|
|
y = 0;
|
|
}
|
|
}
|
|
}
|