ICT3612 Tutorial #6 _ Task 1 to Task 6 S02 Portfolio _ Tech Qwerty Tutorials.pdf

Function to process the radio buttons function

Info icon This preview shows page 1. Sign up to view the full content.

// function to process the radio buttons function useRadioButtons (){ if ( isset ( $_POST [ "submit" ])){ if ( isset ( $_POST [ "option" ])){ $selected = $_POST [ "option" ]; echo "Option selected : " . $selected . "<br />" ; return ; } else { echo "Please choose yes or no" . "<br />" ; } } } echo "<br /><br />" ; ?> < iframe src = "task3.txt" width = "1200" height = "400" > Your browser does not support iframes . </ iframe > </ body > </ html > 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 <! DOCTYPE html > < html > < head > < meta charset = "utf-8" /> </ head > < body > <?php include ( "menu.inc" ); echo "<br /><br />" ; /////////////Task4///////////////// class Dwelling { // properties private $numberOfRooms ; private $sizeOfPlot ; // constructor public function __construct (){ $this -> numberOfRooms = 2 ; $this -> sizeOfPlot = 100 ; } // getter and setter public function getNumberOfRooms (){ return $this -> numberOfRooms ; } public function setNumberOfRooms ( $value ){ $this -> numberOfRooms = $value ; } public function getSizeOfPlot (){ return $this -> sizeOfPlot ; } public function setSizeOfPlot ( $value ){ return $this -> sizeOfPlot = $value ; } } ?> < iframe src = "task4.txt" width = "1200" height = "400" > Your browser does not support iframes . </ iframe > </ body > </ html > 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 <! DOCTYPE html > < html > < head > < meta charset = "utf-8" /> </ head > < body > <?php include ( "menu.inc" ); echo "<br /><br />" ; /////////////Task5/////////////// class Student { private $name ; private $birthyear ; // constructor public function __construct ( $Name , $Birthyear ){ $this -> name = $Name ; $this -> birthyear = $Birthyear ; } public function getName (){ return $this -> name ; } public function setName ( $value ){ return $this -> name = $value ; } public function getBirthYear (){ return $this -> birthyear ; } public function setBirthYear ( $value ){ return $this -> birthyear = $value ; } // method public function showOutput (){ return "Name : " . $this -> getName () . " <br />" . "Birth Year: " . $this -> getBirthYear () . "<br />" ; } } class HostelStudent extends Student { private $nameOfResidence ; // method to get and set the new field public function getNameOfResidence (){ return $this -> nameOfResidence ; } public function setNameOfResidence ( $value ){ return $this -> nameOfResidence = $value ; } // constructor public function __construct ( $Name , $Birthyear , $NameOfResidence ){ $this -> nameOfResidence = $NameOfResidence ; // call the parent constructor parent :: __construct ( $Name , $Birthyear ); } // method public function showOutput (){ return "Name : " . $this -> getName () . " <br />" . "Birth Year: " . $this -> getBirthYear () . "<br />" . "Name of Residence: " . $this } } // creation of object $firstStudent = new Student ( "Wale" , "2004" ); echo $firstStudent -> showOutput (); echo "<br /><br />" ;
Image of page 1
This is the end of the preview. Sign up to access the rest of the document.
  • Fall '16
  • vandermerwe
  • Prime number, Sue, Isaac

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern