国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看

合肥生活安徽新聞合肥交通合肥房產生活服務合肥教育合肥招聘合肥旅游文化藝術合肥美食合肥地圖合肥社保合肥醫院企業服務合肥法律

代寫CS9053、代做Java語言編程

時間:2024-02-15  來源:合肥網hfw.cc  作者:hfw.cc 我要糾錯



Introduction to Java
CS**53 Section I2
Wednesday 6:00 PM – 8:30 PM
Prof. Dean Christakos
Feb 8th, 2024
Due: Feb 15th, 2024 11:59 PM

Part I – Creating Objects

1.Square pyramid: In the lecture you have seen the creation of a circle. Here you are going to create a square pyramid. A square pyramid has a square base. It has base, a, and a height, H.




The Volume of a Pyramid is given by 
l is known at the “slant” and is given by 
The surface area of a square pyramid is given by   

You will create a class SquarePyramid using the following UML:


In standard UML parlance, “+” indicates that a field or method is public and “-“ indicates that a field or method is private. An underlined field or method indicates it is static.


Every time you create a new SquarePyramid instance, it should have a new sequential id, based on the value of nextId, which should be incremented every time you create a new SquarePyramid instance.


2.Objects and Arrays of Objects


Your objective is to develop the Hero and Party class and to use their methods. The classes are described below to guide you.



Hero

The Hero class contains data related to a hero in a video game. Implement the class according to the following UML diagram: 

Hero

Data fields
-name : String
-role: String
-level: int
-experience: int
-MAX_LEVEL: int

-ROLES: String[]
    Name of the Hero
Role of the Hero
Contains the level of the Hero
Contains the experience of the Hero
Constant static int containing the max level of 100.

The possible roles: “Warrior”, “Priest”, “Wizard”, “Thief” (ie, a static, pre-defined array of Strings)

Methods
+Hero (name: String) 


+setRole(role: String)



+getters for each non-static field

+expToLevelUp()
:int



+gainExperience(experience: int)
    














+toString()
    :String    Set the name to given value, set role to “Unassigned”, set level to 1, and experience to 0.

Set the role of the Hero. If the role is not one of the allowed roles, print “Invalid role” and set the role to “Unassigned”.


Get the name, role, level, or experience.

Return the amount of experience necessary to advance to the next level. The formula is level2. For example, at level 6, this should return 62 = 36. This is a helper method for the gainExperience method.

Increase the experience of the Hero. If the experience reaches or passes the maximum for the Hero’s current level, increase the level by 1 by “consuming” the necessary experience.
For example, at level 4 with 20 experience, the Hero should level up to 5 with 4 experience remaining. When a Hero levels up, print “<name> is now level <level>!” The max level is 100.

Note: If enough experience is gained at once, the Hero will level up more than once. For example, a level 3 hero receiving 75 experience will level up to 6 with 
(75 – 9 – 16 – 25) = 25 experience remaining. 





Return a String containing the information about the hero: 

Template:

“<name> the <role> is level <level> with <experience> experience.”

Example:

“Hagrid the Wizard is level 55 with 120 experience.”




Party

The Party class contains an array of Hero‘s that are in the party.
Implement the class according to the following UML diagram:

Party

Data fields
-heroes: Hero[3]
    Array of Hero’s in the current party.

Methods
+Party()


+addHero( hero: Hero, index: int) 



+removeHero(index: int)


+getHero(index: int)
    :Hero

+gainExperience(experience: int)


+toString()
    :String    Initialize the Hero array to hold 3 Hero’s. Initialize each element to null.

Add a Hero to the current party at the given index. If there is an existing Hero at the index, replace it. If the hero is already in the party, print “<name> is already in the party.”

Remove the Hero from the given index (to “remove” from the array, set the array element to null and shift any other elements to the left, so that the only nulls are at the end of the array).

Return the Hero of the desired index.


Prints “The party gained <experience> experience.”
Increase the experience of all the Hero’s in the Party.
Hint: Use each Hero’s gainExperience method.

Return a String containing the information about the hero.
Template:

“Party:
<name> the <role> is level <level> with <experience> experience.
<name> the <role> is level <level> with <experience> experience.
<name> the <role> is level <level> with <experience> experience.


Example:

“Party:
Thor the Warrior is level 10 with 4 experience.
Groot the Thief is level 20 with 19 experience.
Doctor Strange the Wizard is level 5 with 1 experience.“

Note: Only print assigned party members (Do not print anything if any heroes elements are null).
Hint: Use each Hero’s toString method.

After implementing this, create three heroes with names and roles of your choice, add them to the party, and give the party 100 experience points. Then print out the party by calling the toString() method for the party and passing it to System.out.println()
如有需要,請加QQ:99515681 或WX:codehelp

掃一掃在手機打開當前頁
  • 上一篇:代寫CS 476/676 程序
  • 下一篇:代寫COMP26020、代做Java,c++語言編程
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    流體仿真外包多少錢_專業CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢_專業CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務 管路流場仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務 管路
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真技術服務
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲勞振動
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲
    流體cfd仿真分析服務 7類仿真分析代做服務40個行業
    流體cfd仿真分析服務 7類仿真分析代做服務4
    超全面的拼多多電商運營技巧,多多開團助手,多多出評軟件徽y1698861
    超全面的拼多多電商運營技巧,多多開團助手
    CAE有限元仿真分析團隊,2026仿真代做咨詢服務平臺
    CAE有限元仿真分析團隊,2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗證碼 豆包網頁版入口 破天一劍 目錄網 排行網

    關于我們 | 打賞支持 | 廣告服務 | 聯系我們 | 網站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    国产精品在线看| 日韩久久久久久久| 亚洲欧洲另类精品久久综合| 欧美日韩精品免费看| 国产高清在线一区| 亚洲欧美日韩不卡一区二区三区| 国产情侣av自拍| 国产精品国产福利国产秒拍| 欧美亚洲一级片| 久久久久久久久国产| 日本久久久a级免费| 国产成人亚洲精品| 日韩一二区视频| 久久精品国产99精品国产亚洲性色| 亚洲人成网站在线播放2019| 99视频日韩| 亚洲自拍另类欧美丝袜| 国产综合动作在线观看| 国产精品久久久久久久久久久久冷| 欧美一区少妇| 久久精品国产亚洲精品| 男女视频网站在线观看| 国产精品国产一区二区| 国产一级片91| 欧美精品久久久久久久久| 国产麻花豆剧传媒精品mv在线| 欧美激情aaaa| 97成人在线视频| 午夜精品99久久免费| 国产不卡精品视男人的天堂| 欧洲亚洲免费视频| 国产精品视频二| 韩国福利视频一区| 欧美麻豆久久久久久中文| 国产美女精彩久久| 亚洲色图自拍| 久久久噜噜噜www成人网| 人人妻人人添人人爽欧美一区| 久久综合伊人77777蜜臀| 国产自偷自偷免费一区| 中文字幕色一区二区| 91久久精品国产| 日韩经典在线视频| 久久夜色精品国产亚洲aⅴ| 国产精品一 二 三| 少妇久久久久久被弄到高潮| 久久久久久久久久久av| 欧美高清视频一区| 欧美激情精品久久久久久黑人| 99在线视频免费观看| 日韩xxxx视频| 久久久国产影院| 国产欧美日韩高清| 亚洲精品免费av| 色偷偷88888欧美精品久久久| 国产在线一区二区三区欧美| 亚洲精品无码久久久久久| 日韩在线国产精品| 国产日韩在线视频| 日日碰狠狠躁久久躁婷婷| 久久色精品视频| 不卡一区二区三区视频| 欧美一区二区福利| 国产精品日韩二区| 91老司机精品视频| 欧美日韩精品久久| 亚洲综合最新在线| 国产精品手机播放| 国产精品678| 精品日韩美女| 日本中文字幕一级片| 欧美成人精品在线播放| 久久久久免费视频| 国产精品中出一区二区三区| 欧美亚洲国产免费| 亚洲国产精品www| 国产精品免费在线免费| 成人av免费在线看| 韩日精品中文字幕| 日韩视频 中文字幕| 欧美激情区在线播放| 久久深夜福利免费观看| 久久一区二区三区欧美亚洲| 国产一区免费视频| 欧美又大又粗又长| 亚洲精品永久www嫩草| 久色乳综合思思在线视频| 久久久久久久久久久亚洲| 成人精品一区二区三区电影黑人| 欧美亚洲在线视频| 日韩av电影在线免费播放| 欧美精品999| 久久久国产精品免费| 69精品丰满人妻无码视频a片| 国产一区欧美二区三区| 欧美激情专区| 日本精品免费在线观看| 亚洲日本精品国产第一区| 国产精品免费一区二区三区在线观看| 国产成人精品视频ⅴa片软件竹菊| av动漫免费看| 国产美女精品视频| 国模吧一区二区| 日韩美女av在线免费观看| 欧美一区二区三区精美影视| 亚洲字幕一区二区| 欧美极品在线播放| 久久综合久久八八| 国产精品视频男人的天堂| 久久96国产精品久久99软件| 国产精品69精品一区二区三区| av无码精品一区二区三区| 国产一二三四区在线观看| 免费在线观看一区二区| 日韩精品av一区二区三区| 日本不卡一区二区三区在线观看| 午夜精品三级视频福利| 亚洲一区二区在线| 亚洲影院色在线观看免费| 中日韩在线视频| 欧美精品久久一区二区| 中文字幕久久一区| 久久成人这里只有精品| 欧美成人午夜剧场免费观看| 另类天堂视频在线观看| 精品国产一区三区| 欧美日韩不卡合集视频| 色综合久久88色综合天天看泰| 久热精品视频在线观看| 久久艳片www.17c.com| 精品国产乱码久久久久软件| 蜜臀久久99精品久久久无需会员| 国产精品国产三级国产aⅴ9色| 国产精品久久成人免费观看| 久久国产精彩视频| 欧美精品成人在线| 亚洲淫片在线视频| 日韩av电影在线网| 日本最新一区二区三区视频观看| 日本公妇乱淫免费视频一区三区| 奇米影视首页 狠狠色丁香婷婷久久综合 | 亚洲一区二区三区av无码| 亚洲精品一品区二品区三品区| 性欧美亚洲xxxx乳在线观看| 日韩视频 中文字幕| 黄色av网址在线播放| 国产日韩欧美亚洲一区| 99在线免费观看视频| 国产不卡视频在线| 国产成人精品在线播放| 欧美精品制服第一页| 亚洲综合最新在线| 日本福利视频一区| 国内精品伊人久久| 古典武侠综合av第一页| 国产suv精品一区二区| 国产精品日韩av| 欧美激情区在线播放| 日本一区二区三区四区高清视频| 欧美国产日韩激情| chinese少妇国语对白| 久操手机在线视频| 国产精品国三级国产av| 亚洲一区二区三区777| 日韩精品无码一区二区三区免费| 国模精品一区二区三区| 成人在线免费观看一区| 久久精品aaaaaa毛片| 久久这里只有精品视频首页| 午夜免费福利小电影| 欧美精品一区二区三区在线四季| 国产日韩欧美综合| 久久久久久久久久国产精品| 九九精品视频在线| 日韩欧美一区二区在线观看| 国产一区二区香蕉| 久久久综合香蕉尹人综合网| 久久伊人精品视频| 日韩av高清| 国产视频一区二区视频| 久久久国产精华液999999| 精品久久久久久久免费人妻| 日本欧美视频在线观看| 国产欧美婷婷中文| 日韩在线观看你懂的| 亚洲一区亚洲二区| 黄色网页免费在线观看| 国产精品av在线| 欧美区二区三区| 欧美国产一二三区| 久久琪琪电影院| 欧美另类99xxxxx| 欧洲美女7788成人免费视频| caoporn国产精品免费公开| 国产精品视频一区二区三区四| 日韩一级片一区二区| 国产欧美日韩中文| 久久精视频免费在线久久完整在线看| 午夜一区二区三区| 国产精品一区二区三区免费|