From 6ef295a77791a5ee898a0bdc13b29005630728ed Mon Sep 17 00:00:00 2001 From: janik Date: Thu, 21 Oct 2021 11:29:58 +0200 Subject: [PATCH] =?UTF-8?q?=C3=BCbung=20user?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 12fi5/AEuP/user.ps1 | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 12fi5/AEuP/user.ps1 diff --git a/12fi5/AEuP/user.ps1 b/12fi5/AEuP/user.ps1 new file mode 100644 index 0000000..d0b1e8e --- /dev/null +++ b/12fi5/AEuP/user.ps1 @@ -0,0 +1,30 @@ +class user { + [string]$vorname + [string]$nachname + [string]$email + [string]$password + + [void]setName([string]$vorname, [string]$nachname) { + $this.vorname = $vorname + $this.nachname = $nachname + $this.email = $vorname + "." + $nachname + "@irgendwas.de" + } + + [void]readName() { + $vn = Read-Host "Vorname" + $nn = Read-Host "Nachname" + $this.setName($vn, $nn) + } + + [void]printInfo() { + Write-Host $this.vorname + Write-Host $this.nachname + Write-Host $this.email + Write-Host $this.password + } +} + +$user = [user]::new() + +$user.readName() +$user.printInfo() \ No newline at end of file