Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class KelompokMakanan {
- public$makanan;
- public function jenis() {
- $makanan = $this->makanan;
- switch($makanan) {
- case 'Daging' : return 'Karnivora';
- case 'Sayuran' : return 'Herbivora';
- case 'Capcay' : return 'Omnivora';
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement