publicclassLOL{publicstaticvoidmain(String[]args){hreogaren=newhreo(盖伦,616f,2" />
>ڵλ:е̨ > ϰ

面向对象系列教材 (一

2019-07-30 13:54:admin

面向对象系列教材 (一

双击选中所有代?/h5>">publicclassLOL{publicstaticvoidmain(String[]args){hreogaren=newhreo(盖伦,616f,27f,350);hreoteemo=newhreo(提莫,383f,14f,330);(()+...+()+...+()+...+());(()+...+()+...+()+...+());(newItem(多兰quot;,450).getEquip()+...+newItem(多兰quot;,450).getPrice());(newItem(多兰quot;,400).getEquip()+...+newItem(多兰quot;,400).getPrice());}}classhreo{privateStringname;//英雄名字privatefloathp;//血?privatefloatarmor;//护甲privateintmoveSpeed;//移动速度publichreo(){super();}publichreo(Stringname,floathp,floatarmor,intmoveSpeed){super();=name;=hp;=armor;=moveSpeed;}publicStringgetName(){returnname;}publicvoidsetName(Stringname){=name;}publicfloatgetHp(){returnhp;}publicvoidsetHp(floathp){=hp;}publicfloatgetArmor(){returnarmor;}publicvoidsetArmor(floatarmor){=armor;}publicintgetMoveSpeed(){returnmoveSpeed;}publicvoidsetMoveSpeed(intmoveSpeed){=moveSpeed;}}classItem{privateStringequip;//装备privateintprice;//价格publicItem(){super();}publicItem(Stringequip,intprice){super();=equip;=price;}publicStringgetEquip(){returnequip;}publicvoidsetEquip(Stringequip){=equip;}publicintgetPrice(){returnprice;}publicvoidsetPrice(intprice){=price;}}

һƪйҵѧоԺ

һƪû

Ƽ

ͼľۼ