Advertisement
HristoBaychev

racing

Apr 14th, 2023
610
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.70 KB | None | 0 0
  1. <?php
  2.  
  3. class carRacing{
  4.     private static $lastId;
  5.     private $id;
  6.  
  7.     private $pilot;
  8.     private $car;
  9.     private $speed;
  10.     private $timeInBox;
  11.  
  12.     function __construct(string $pilot, string $car, int $speed, int $timeInBox){
  13.         $this->pilot = $pilot;
  14.         $this->car = $car;
  15.         $this->speed = $speed;
  16.         $this->timeInBox =  $timeInBox;
  17.     }
  18.  
  19.     public function getName():string{
  20.         $this->pilot = $pilot;
  21.     }
  22.  
  23.     public function getCar():string{
  24.         $this->car = $car;
  25.     }
  26.  
  27.     public function getSpeed():int{
  28.         $this->speed = $speed;
  29.     }
  30.  
  31.     public function getTimeInBox():int{
  32.         $this->timeInBox = $timeInBox;
  33.     }
  34.  
  35.  
  36. }
  37.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement