⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sport.as

📁 用Flex实现的一个关于减肥系统的web界面,内部没有实际的业务逻辑,只是一个原形.
💻 AS
字号:
package diet.vo.activity
{
	[Bindable]
	public class Sport
	{
		public var type:String;//食物类型
		public var name:String;//名称
		public var amount:Number = 1;//数量
		public var unit:String = "分钟";//单位
		public var caloriePerUnit:Number;//每单位卡路里数
		public var remark:String;//备注
		
		public function init(type:String,name:String,amount:Number,
							caloriePerUnit:Number,unit:String="",remark:String=""):void
		{
			this.type = type;
			this.name = name;
			this.amount = amount;
			this.caloriePerUnit = caloriePerUnit;
			this.unit = unit;
			this.remark = remark;
		}
		
		public function initByType(type:String):void
		{
			this.type = type;
		}
		
		public function toString():String
		{
			return this.name+" "+this.amount+this.unit
			+"</b>\n"+"可消耗"+this.caloriePerUnit*this.amount+"卡路里";
		}

	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -