正在加载图片...
●●●●● ●●●● ●●● 参数可见性 ●●● ●●●● ●当B作为参数传递给A的方法时,则存在A到B的 参数可见性。 enterltem(id, gty) 2: make Lineltem(desc, aty) Register sale 1: desc= getProductDesc(id) 2.1: create(desc, qty) Product atalog makeLineltem(ProductDescription desc, int gty) sI: SalesLineltem sl= new SalesLineltem(desc, gty)参数可见性 enterItem 2: makeLineItem(desc, qty) (id, qty) 1: desc = getProductDesc(id) 2.1: create(desc, qty) :Register :Sale :Product Catalog sl : SalesLineItem makeLineItem(ProductDescription desc, int qty) { ... sl = new SalesLineItem(desc, qty); ... } ⚫ 当B作为参数传递给A的方法时,则存在A到B的 参数可见性
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有