Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Car {
- private $model,$prodYear,$trademark,$engineSize;
- public function __construct($model,$prodYear,$trademark,$engineSize)
- {
- $this->model=$model;
- $this->prodYear=$prodYear;
- $this->trademark=$trademark;
- $this->engineSize=$engineSize;
- }
- }
- class User extends Car {
- private $userName,$password,$firstName,$lastName,$sex,$email,$secretQuestion,$secretAnswer,$numberCars,$picPath;
- public function setUserNamesPass($userName,$password,$firstName,$lastName){
- $this->userName=$userName;
- $this->password=$password;
- $this->firstName=$firstName;
- $this->lastName=$lastName;
- }
- public function setHelpInfo($sex,$email,$secretQuestion,$secretAnswer){
- $this->sex=$sex;
- $this->email=$email;
- $this->secretQuestion=$secretQuestion;
- $this->secretAnswer=$secretAnswer;
- }
- public function setPicCars($picName,$numberCars){
- $this->picPath='uploads/'.$picName;
- $this->numberCars=$numberCars;
- }
- public function showPicture()
- {
- echo "<br><img src='{$this->picPath}' alt='... No Profile Picture ...'><br>";
- }
- // Tova e pod vypros ....
- public function createCars(){
- if($this->numberCars==1)
- {
- $this->__construct($model,$prodYear,$trademark,$engineSize);
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement