中国高校课件下载中心 》 教学资源 》 大学文库

复旦大学:《面向对象分析和设计》课程资料_分析模式_观察和测量模式

文档信息
资源类别:文库
文档格式:PPTX
文档页数:108
文件大小:1.3MB
团购合买:点击进入团购
内容简介
复旦大学:《面向对象分析和设计》课程资料_分析模式_观察和测量模式
刷新页面文档预览

数量/ Quantity模式 Slid before 1st Section Divider 随时间变化事物 (Things That 扩 Change with Time 模式 展 Unused 观察和 Section 测量模 Space 2

Slides before 1st Section Divider 随时间变化事物 (Things That Change with Time) 模式 数量/ Quantity模式 Unused Section Space 2 观察和 测量模式 Unused Section Space 3 Unused Section Space 4 Unused Section Space 1 扩展

观察和测量模式 徐迎晓 复旦大学软件学院 xuyingxiao@126.com

观察和测量模式 徐迎晓 复旦大学软件学院 xuyingxiao@126.com

数量/ Quantity ● class Person{ int height; int weight

数量/Quantity class Person{ int height; int weight; … }

Java中已有的 Number ●C| ass number Method Summary byte byte O Returns the value of the specified number as a byte. abstract double O double Returns the value of the specified number as a double abstract float value O float Returns the value of the specified number as a float abstract intValueO ant Returns the value of the specified number as an int abstract long Value long Returns the value of the specified number as a long. short shortValueO Returns the value of the specified number as a short

Java中已有的Number Class Number

Person height: Number weight: Number blood gl ucose le vel Number

数量 Person Quantit height: Quant amount. Number weight: Quantity units: Unit blood glucose level: Quantity

数量

Quantit amount: number unit: UnIt to[unit]: quanity to stinE

Quantity

● arithmetic

arithmetic

Java中已有的Unit o Currency Method Summary Strins getCurrencyCode() Gets the Iso 4217 currency code of this currency. getDefaultFractionDigitsO Gets the default number of fraction digits used with this currency. static Currensz getInst ance(Locale locale) Returns the Currency inst ance for the country of the given locale. static Currensz get Inst ance(String currency Code) Returns the Currency inst ance for the given currency code stran get Sobol( Gets the symbol of this currency for the default locale. Strins get Symbol(Localelocale Gets the symbol of this currency for the specified locale. Strins toString( Returns the iso 4217 currency code of this currency

Java中已有的Unit Currency

Money ● Money是数量的一种特殊实例

Money Money是数量的一种特殊实例

刷新页面下载完整文档
VIP每日下载上限内不扣除下载券和下载次数;
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
相关文档