<?php
	class CarroController extends CarroModel {
		private $idUsuario;
		private $idFamilia;
		private $nome;
		private $preco;
		private $matricula;

		public function __construct($idUsuario, $idFamilia , $nome, $preco, $matricula){
			$this->idUsuario = $idUsuario;
			$this->idFamilia = $idFamilia;
			$this->nome = $nome;
			$this->preco = $preco;
			$this->matricula = $matricula;
		}

		public function createCarro(){
			$result = $this->insertCarro($this->idUsuario, $this->idFamilia, $this->nome, $this->preco, $this->matricula);
			return $result;
		}

		public function editCarro($idCarro){
			$this->updateCarro($idCarro, $this->idUsuario, $this->idFamilia, $this->nome, $this->preco, $this->matricula);
		}

		public function eliminaCarro($idCarro){
			$this->deleteCarro($idCarro);
		}

	}