| 기존의 클래스 | 확장된 클래스 | ||
|---|---|---|---|
| 용어 | 영문 | 용어 | 영문 |
| 기반클래스 | base class | 파생클래스 | derived class |
| 수퍼클래스 | super class | 서브클래스 | sub class |
| 부모클래스 | parent class | 자식클래스 | child class |
class Cart {
var $items; // Items in our shopping cart
// Add $num articles of $artnr to the cart
function add_item ($artnr, $num) {
$this->items[$artnr] += $num;
}
// Take $num articles of $artnr out of the cart
function remove_item ($artnr, $num) {
if ($this->items[$artnr] > $num) {
$this->items[$artnr] -= $num;
return true;
} else {
return false;
}
}
}
class Named_Cart extends Cart {
var $owner;
function set_owner ($name) {
$this->owner = $name;
}
} $ncart = new Named_Cart; // Create a named cart
$ncart->set_owner ("kris"); // Name that cart
print $ncart->owner; // print the cart owners name
$ncart->add_item ("10", 1); // (inherited functionality from cart)Today owning a new and trendy looking gucci on sale are not only meant for the wealthy people. These are now made luxurious and affordable gucci to reach out to every budget and range. You can just enjoy them by ordering red bottomshoe sale online where you get the complete satisfaction and genuine quality at best possible rates. The finish, quality and designs you get from louboutin 2012 are really astonishing and you will love them all. Today owning a new and trendy looking laboutin uk are not only meant for the wealthy people. These are now made luxurious and affordable christian laboutin to reach out to every budget and range. You can just enjoy them by ordering gucci 2012 online where you get the complete satisfaction and genuine quality at best possible rates. The finish, quality and designs you get from laboutin are really astonishing and you will love them all.
| 번호 | 제목 | 닉네임 | 조회 | 등록일 | 최근 수정일 | 상태 |
|---|---|---|---|---|---|---|
| 7 | 1.클래스 정의 | joy24 |
55 | 2000-07-13 | 2000-07-13 13:43 | 완료 |
| 6 | 2.객체 생성 | joy24 |
49 | 2000-07-13 | 2000-07-13 13:22 | 완료 |
![]() |
3.클래스 상속 [1] | joy24 |
70 | 2000-07-13 | 2012-03-24 17:52 | 완료 |
| 4 | 4.생성자 [1] | joy24 |
43 | 2000-07-13 | 2012-03-24 17:52 | 완료 |
| 3 | 5.범위연산자 | joy24 |
22 | 2000-07-13 | 2000-07-13 13:04 | 완료 |
| 2 | 6.parent | joy24 |
26 | 2000-07-13 | 2000-07-13 13:06 | 완료 |
| 1 | 7.매직함수 [2] | joy24 |
61 | 2000-07-13 | 2012-03-24 17:52 | 완료 |
아이디가 없으신 분은
회원가입 후 이용하실 수 있습니다.
