Advertisement
Guest User

Untitled

a guest
Jan 31st, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.54 KB | None | 0 0
  1. <?php
  2.     class Car {
  3.         private $model,$prodYear,$trademark,$engineSize;
  4.         public function __construct($model,$prodYear,$trademark,$engineSize)
  5.         {
  6.             $this->model=$model;
  7.             $this->prodYear=$prodYear;
  8.             $this->trademark=$trademark;
  9.             $this->engineSize=$engineSize;
  10.         }
  11.     }
  12.  
  13.     class User extends Car {
  14.         private $userName,$password,$firstName,$lastName,$sex,$email,$secretQuestion,$secretAnswer,$numberCars,$picPath;
  15.         public function setUserNamesPass($userName,$password,$firstName,$lastName){
  16.             $this->userName=$userName;
  17.             $this->password=$password;
  18.             $this->firstName=$firstName;
  19.             $this->lastName=$lastName;
  20.         }
  21.         public function setHelpInfo($sex,$email,$secretQuestion,$secretAnswer){
  22.             $this->sex=$sex;
  23.             $this->email=$email;
  24.             $this->secretQuestion=$secretQuestion;
  25.             $this->secretAnswer=$secretAnswer;
  26.         }
  27.         public function setPicCars($picName,$numberCars){
  28.             $this->picPath='uploads/'.$picName;
  29.             $this->numberCars=$numberCars;
  30.         }
  31.         public function showPicture()
  32.         {
  33.             echo "<br><img src='{$this->picPath}' alt='... No Profile Picture ...'><br>";
  34.         }
  35.         // Tova e pod vypros ....
  36.         public function createCars(){
  37.             if($this->numberCars==1)
  38.             {
  39.                 $this->__construct($model,$prodYear,$trademark,$engineSize);
  40.             }
  41.         }
  42.  
  43.  
  44.     }
  45. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement