Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Product
- {
- private $name;
- private $amount;
- private $type;
- public function __construct(string $name, float $amount, string $type)
- {
- $this->name = $name;
- $this->amount = $amount;
- $this->type = $type;
- }
- public function getName(): string
- {
- return $this->name;
- }
- public function setName(string $name): void
- {
- $this->name = $name;
- }
- public function getAmount(): float
- {
- return $this->amount;
- }
- public function setAmount(float $amount): void
- {
- $this->amount = $amount;
- }
- public function getType(): string
- {
- return $this->type;
- }
- public function setType(string $type): void
- {
- $this->type = $type;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement