Dienstag, 13. Mai 2014

09:16 Posted by Victoria No comments
hallo 123 456

Montag, 12. Mai 2014

Nther one

14:16 Posted by Victoria No comments
BSajcksavdsv fg dfg dfg
dg
 fd

v
df
df

vs
df vdfgjhvjfbkjdsb jd nmd mnd dnm d

Just a Test

14:16 Posted by Victoria No comments
fdsgjorie thdshgdjks jkhsfjkheildsb je fknde cAIF Zusammenfassung

Erstelle eine Klasse:

<?php

                      class party
                      {

                      }

?>

Erstelle einen Konstruktor + 3 Variablen ($besucher, $preis, $alkohol)

<?php

                      Class Party
                      {
                                    Protected Var $besucher, $preis, $alkohol;
                                   
                                    Public Function Party($b,$p,$a)
                                    {
                                                  $this->besucher=$b;
                                                  $this->preis=p;
                                                  $this->alkohol=a;
                                                 
                                    }
                      }

?>


Erstelle eine Funktion (addieren) die Besucher mit Preis addiert und ausgibt, auch die Variable Alkohol soll ausgeben werden.

<?php

                      Class Party
                      {
                                    Protected Var $besucher, $preis, $alkohol;
                                   
                                    Public Function Party($b,$p,$a)
                                    {
                                                  $this->besucher=$b;
                                                  $this->preis=p;
                                                  $this->alkohol=a;
                                                 
                                    }


                                    Public Function addieren()
                                    {
                                   
                                                  Echo (“Einnahmen: “.$this->besucher*$this->preis. “ Alkohol “.$this->alkohol)
                                   
                                    }
                      }

?>



Erstelle anschließend eine neue Party (Lenishouseparty)

<?php

                      Class Party
                      {
                                    Protected Var $besucher, $preis, $alkohol;
                                   
                                    Public Function Party($b,$p,$a)
                                    {
                                                  $this->besucher=$b;
                                                  $this->preis=p;
                                                  $this->alkohol=a;
                                                 
                                    }


                                    Public Function addieren()
                                    {
                                   
                                                  Echo (“Einnahmen: “.$this->besucher*$this->preis. “ Alkohol “.$this->alkohol)
                                   
                                    }
                      }

$lenishouseparty=new Party(22,10,“alles“);
$lenishouseparty-> addieren();

?>

Beerben!

Die Klasse “Party“ hat eine Tochter bekommen, diese nennen wir beachparty mit zwei neuen variablen ($bikini, $location)



<?php

                      class party
                      {
                                    protected var $besucher, $preis, $alkohol;
                                   
                                    public function party($b,$p,$a)
                                    {
                                                  $this->besucher=$b;
                                                  $this->preis=p;
                                                  $this->alkohol=a;
                                                 
                                    }


                                    public function addieren()
                                    {
                                   
                                                  echo (“einnahmen: “.$this->besucher*$this->preis. “ alkohol “.$this->alkohol)
                                   
                                    }
                      }

                      class beachparty extends party
                      {
                                    protected $bikini, $location;
                                   
                                    function beachparty($b,$p,$a,$bk,$l)
                                    {
                                                  $this->Party($b,$p,$a);
                                                  $this->bikini=bk;
                                                  $this->location=l;
                                   
                                    }
                                                 
                                   
                      }


?>


Wenn Bikini Rot ist, soll „Der Bikini ist Rot!“ Ausgegeben werden. Wenn nicht, soll „Der Bikini ist nicht Rot!“ Ausgegeben werden!

<?php

                      class party
                      {
                                    protected var $besucher, $preis, $alkohol;
                                   
                                    public function party($b,$p,$a)
                                    {
                                                  $this->besucher=$b;
                                                  $this->preis=p;
                                                  $this->alkohol=a;
                                                 
                                    }


                                    public function addieren()
                                    {
                                   
                                                  echo (“einnahmen: “.$this->besucher*$this->preis. “ alkohol “.$this->alkohol)
                                   
                                    }
                      }

                      class beachparty extends party
                      {
                                    protected $bikini, $location;
                                   
                                    function beachparty($b,$p,$a,$bk,$l)
                                    {
                                                  $this->Party($b,$p,$a);
                                                  $this->bikini=bk;
                                                  $this->location=l;
                                   
                                    }
                                   
                                    Function ausgabe()
                                    {
                                                  If($bikini==“rot“)
                                                  {
                                                                Echo(“Der Bikini ist Rot!“);
                                                  }
                                                 
                                                  Else
                                                  {
                                                                Echo(“Der Bikini ist nicht Rot!“);
                                                  }
                                   
                                    }
                                   
                      }


$summersplash=new beachparty(22,200,“viel“,rot,Türkei)
$summersplash->ausgabe();

?>