Copy and Paste  -   An Application to Copy/Paste Text  

 
S.No 4359 Name OOP-CIT Date/Time 11-Mar-2020 04:51:40 PM

Copy text from below
<?php
/**
*
*/
class BankAccount
{
public $name;
public $accNumber;
public $mobile;
public $balance;
public $dateCreated;

function __construct($name, $accNumber, $mobile, $balance){
$this->name = $name;
$this->accNumber = $accNumber;
$this->mobile = $mobile;
$this->balance = $balance;
$this->dateCreated = date("Y-m-d");
}

function deposite($amount){
$this->balance += $amount;
echo "Parent Function Call: Amount Rs. ".$amount." deposited. New Balance is Rs. ".$this->balance;
}

}

class currentAccount extends BankAccount
{

function __construct($name, $accNumber, $mobile, $balance)
{
parent::__construct($name, $accNumber, $mobile, $balance);
}

function withdraw($amount){
$this->balance -= $amount;
echo "Current Account Function Call: Amount withdrawn";
echo "Remaining Balance: ".$this->balance."<br>";
}
}

class savingAccount extends BankAccount
{
public $interestDate;

function __construct($name, $accNumber, $mobile, $balance)
{
parent::__construct($name, $accNumber, $mobile, $balance);
$this->interestDate = date("2020-02-01");
}

function withdraw($amount){
$this->balance -= $amount + ($amount*5)/100;
echo "Saving Account Function Call: Amount withdrawn";
echo "Remaining Balance: ".$this->balance."<br>";
}

function addInterest(){
$difference = date_diff(date_create($this->interestDate),date_create(date('Y-m-d')));

//echo $difference->format('%R%a');
if ($difference->format('%R%a') > 30) {
$interest = ($this->balance*10)/100;
$this->balance += $interest;
echo "Rs. ".$interest." Interest Added";
}
}
}

$obj = new currentAccount("Mansoor Khan", "109", "03329899396", 1000);

$obj->deposite(1500);
$obj->withdraw(1200);

//echo $obj->interestDate;
//echo $obj->addInterest();

?>




comments powered by Disqus
NEW ENTRIES
S.No Name Entry Time/Date
4460 drop 21-Jan-2021 04:01:50 PM
4459 asda 21-Jan-2021 03:54:27 PM
4458 asda 21-Jan-2021 03:54:05 PM
4457 zeb.xml 20-Jan-2021 10:33:38 PM
4456 zeb 20-Jan-2021 10:32:54 PM
4455 WEBvIEW 20-Jan-2021 05:34:52 PM
4454 osm_phone 19-Jan-2021 05:47:37 PM
4453 ii 18-Jan-2021 02:03:04 PM
4452 Ikram audio 18-Jan-2021 01:17:34 PM
4451 AWS 17-Jan-2021 04:22:27 PM
4450 row.xml 15-Jan-2021 03:40:59 PM
4449 parm table 12-Jan-2021 04:05:42 PM
4448 andriod 08-Jan-2021 03:29:57 PM
4447 AMK2 08-Jan-2021 03:05:46 PM
4446 AMK 1 08-Jan-2021 03:05:25 PM
4445 link 07-Jan-2021 11:35:05 PM
4444 test 05-Jan-2021 10:24:22 AM
4443 file up flas 05-Jan-2021 10:23:49 AM
4442 NRG Benjyfis 04-Jan-2021 04:04:39 AM
4441 Os 01-Jan-2021 10:04:46 PM
4440 post 01-Jan-2021 12:16:39 PM
4439 afaq 01-Jan-2021 11:27:02 AM
4438 python_flask 28-Dec-2020 02:05:29 AM
4437 link 24-Dec-2020 03:27:25 PM
4436 internet 16-Dec-2020 06:08:27 PM
4435 http 16-Dec-2020 06:05:59 PM
4434 uuu 14-Dec-2020 10:36:15 AM
4433 dd 12-Dec-2020 11:00:00 PM
4432 23 12-Dec-2020 10:54:41 PM
4431 94 12-Dec-2020 10:40:18 PM

1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 [Next] [Last]
 
web counter
web counter


To report any error messages or bugs, or other issues, please send email at: info@pakproject.com