Blogger Information
Blog 8
fans 0
comment 0
visits 5808
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
计算图形的面积与周长-4
柯二南的博客
Original
695 people have browsed it
<?php

 class Result{

	private $shape=null;
	function __construct()
	{
		$this->shape=new $_GET['action']();
	}
	function __toString(){
		$result=$this->shape->shapeName.'的周长:'.round($this->shape->perimoter(),2).'<br>';
		$result.=$this->shape->shapeName.'的面积:'.round($this->shape->area(),2).'<br>';
		return $result;
	}
}


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post