[Solved]-1 Given Following Object Oriented Php Code Class Animal Private Sname Private Legs Public Q37280816

1. (a) You are given the following Object-Oriented PHP code class Animal ( private Sname; private $legs; public function construct (Sn, $1) // Note: double “_” $this->name-# $n; $1; $this->legs = public function getName ) return $this->name; class Cat extends Animal private SdignifiedName; public function construct (Sname, $dn) ( parent:: construct (Sname, 4)// Note: double “” Sthis->dignifiedName $dn; public function getDignifiedName ) return $this-dignifiedName; $cat = new Cat ( ‘ Peter ‘ , echo scat->getName)is really ‘Scat->getDignifiedName (); ‘ Munkus trap ‘ ) ; Assume the above code compiles and runs without any errors. What is its output? [6 marks] (b) Below you are given a Codelgniter URL: http://mywebsite.co.uk/ci/index.php/bank/widthraw/5000 Explain what information we are requesting when we use the above URL, given that “ci” is the folder name for Codelgniter. 3 marks] Show transcribed image text 1. (a) You are given the following Object-Oriented PHP code class Animal ( private Sname; private $legs; public function construct (Sn, $1) // Note: double “_” $this->name-# $n; $1; $this->legs = public function getName ) return $this->name; class Cat extends Animal private SdignifiedName; public function construct (Sname, $dn) ( parent:: construct (Sname, 4)// Note: double “” Sthis->dignifiedName $dn; public function getDignifiedName ) return $this-dignifiedName; $cat = new Cat ( ‘ Peter ‘ , echo scat->getName)is really ‘Scat->getDignifiedName (); ‘ Munkus trap ‘ ) ; Assume the above code compiles and runs without any errors. What is its output? [6 marks]
(b) Below you are given a Codelgniter URL: http://mywebsite.co.uk/ci/index.php/bank/widthraw/5000 Explain what information we are requesting when we use the above URL, given that “ci” is the folder name for Codelgniter. 3 marks]
Expert Answer
Answer to 1. (a) You are given the following Object-Oriented PHP code class Animal ( private Sname; private $legs; public function… . . .
OR

