Araba Satışı Ciro otomasyon örnegi

Otomobil satışından kazanılan ücreti gösteren ufak bir php scripti. OOP mimarısı uygulanarak yapılmıştır.

otomobil.php

<?php
include("otomobilClass.php");
$marka ="fiat";
$model = "2010";
$fiyat = "10000";
$satisAdedi = "3";
$otomobil = new otomobil();
$otomobil->ciroHesapla($marka, $model, $fiyat, $satisAdedi);
?>

otomobilClass.php

<?php
class otomobil
{
public $marka,$model,$fiyat,$satisAdedi;
function ciroHesapla($marka,$model,$fiyat,$satisAdedi)
{
$this->marka = $marka;
$this->model = $model;
$this->fiyat = $fiyat;
$this->satisAdedi = $satisAdedi;
echo $this->marka."<br>".$this->model."<br>".($this->fiyat*$this->satisAdedi);
}
}
?>


Twitter Digg Delicious Stumbleupon Technorati Facebook
Yazar :

PHP Programcısı

http://www.tasarimrehberi.com

1 Yorum “Araba Satışı Ciro otomasyon örnegi”

  1. Hocam cok saolunn ..:)