College Assignment Help

Html / CSS : Movie Class

  

Running Head: CREATE A MOVIE CLASS1CREATE A MOVIES CLASS THAT
DETERMINES THE COST OF A TICKET TO ACINEMA,Student Name:Instructor
Name:Course:Date:CREATE A MOVIE CLASScustage=$custage;}// Create a
function named ‘calprice()’.// This function is used to calculate
the price of the ticket.public function
calprice($movieticketPrice){// Create an ‘if’ statement to check
the age is less than 5 or not.if($this->custage < 5){return 0;}2CREATE A MOVIE CLASS// Create an 'else-if' statement to check the age is less than 18 and greater than 5.else if ($this->custage > 5 && $this->custage < 18){return $movieticketPrice / 2;}// Create an 'else-if' statement to check the age is less than 56 and greater than 17.else if($this->custage >= 18 && $this->custage <= 55){return $movieticketPrice;} // Third case If age is between 18 and 55 including both// Create an 'else' to calculate the ticket price which are greater than the age of 55.else{return $movieticketPrice - (float) ("2.00");}}}// Create an object named 'movieObj' for the class named 'Movies'$movieObj = new Movies();// Assume the cost of the full-price ticket is $10$fullPriceTicket = 10;3CREATE A MOVIE CLASS// Assign the age.$movieObj -> age(4);//
Call the m …

Don't use plagiarized sources. Get Your Custom Essay on
Html / CSS : Movie Class
Just from $10/Page
Order Essay