日本搞逼视频_黄色一级片免费在线观看_色99久久_性明星video另类hd_欧美77_综合在线视频
源代碼:
#!/usr/bin/ruby -w # 定義類 class Box # 構造器方法 def initialize(w,h) @width, @height = w, h end # 實例方法默認是 public 的 def getArea getWidth() * getHeight end # 定義 private 的訪問器方法 def getWidth @width end def getHeight @height end # make them private private :getWidth, :getHeight # 用于輸出面積的實例方法 def printArea @area = getWidth() * getHeight puts "Big box area is : #@area" end # 讓實例方法是 protected 的 protected :printArea end # 創建對象 box = Box.new(10, 20) # 調用實例方法 a = box.getArea() puts "Area of the box is : #{a}" # 嘗試調用 protected 的實例方法 box.printArea()
運行結果:
#!/usr/bin/ruby -w # 定義類 class Box # 構造器方法 def initialize(w,h) @width, @height = w, h end # 實例方法默認是 public 的 def getArea getWidth() * getHeight end # 定義 private 的訪問器方法 def getWidth @width end def getHeight @height end # make them private private :getWidth, :getHeight # 用于輸出面積的實例方法 def printArea @area = getWidth() * getHeight puts "Big box area is : #@area" end # 讓實例方法是 protected 的 protected :printArea end # 創建對象 box = Box.new(10, 20) # 調用實例方法 a = box.getArea() puts "Area of the box is : #{a}" # 嘗試調用 protected 的實例方法 box.printArea()
主站蜘蛛池模板:
午夜精品久久久久久99热软件
|
91久久久一线二线三线品牌
|
美女又黄又爽
|
成人区精品一区二区
|
日韩精品欧美
|
久久精品欧美一区二区三区不卡
|
欧美a√
|
国产一区精品视频
|
狠狠色网站
|
色一情一乱一伦一区二区三区
|
国产在线一区二区三区四区
|
国产精品去看片
|
夜夜骑首页
|
日韩欧美黄色
|
中文精品一区
|
久久首页
|
色综合色综合色综合色综合
|
国产一区二区精品在线
|
久国久产久精永久网页
|
国产精品99精品久久免费
|
日批免费看
|
毛片真人毛毛片毛片
|
成人天堂资源www在线
|
欧美国产日韩视频
|
国产精品日韩在线观看
|
天天揉久久久久亚洲精品
|
国产一区二区中文字幕
|
伊人91在线
|
一区二区三区在线
|
国产精品久久久99
|
av在线色
|
亚洲福利小视频
|
在线视频国产一区
|
欧美一级网址
|
最新免费av
|
色呦呦在线观看视频
|
成年人小视频
|
日韩在线视频观看
|
欧美日韩福利视频
|
丁香六月婷婷
|
国产ts一区
|