99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

合肥生活安徽新聞合肥交通合肥房產(chǎn)生活服務(wù)合肥教育合肥招聘合肥旅游文化藝術(shù)合肥美食合肥地圖合肥社保合肥醫(yī)院企業(yè)服務(wù)合肥法律

代寫CS9053、代做Java語言編程

時間:2024-02-15  來源:合肥網(wǎng)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

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

    合肥圖文信息
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計優(yōu)化
    急尋熱仿真分析?代做熱仿真服務(wù)+熱設(shè)計優(yōu)化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發(fā)動機性能
    挖掘機濾芯提升發(fā)動機性能
    海信羅馬假日洗衣機亮相AWE  復(fù)古美學(xué)與現(xiàn)代科技完美結(jié)合
    海信羅馬假日洗衣機亮相AWE 復(fù)古美學(xué)與現(xiàn)代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
    合肥機場巴士2號線
    合肥機場巴士2號線
    合肥機場巴士1號線
    合肥機場巴士1號線
  • 短信驗證碼 豆包 幣安下載 AI生圖 目錄網(wǎng)

    關(guān)于我們 | 打賞支持 | 廣告服務(wù) | 聯(lián)系我們 | 網(wǎng)站地圖 | 免責(zé)聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網(wǎng) 版權(quán)所有
    ICP備06013414號-3 公安備 42010502001045

    99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          久久这里只有| 欧美日韩国产黄| 欧美夫妇交换俱乐部在线观看| 麻豆91精品| 欧美精品导航| 国产模特精品视频久久久久| 国产亚洲福利一区| 亚洲激情偷拍| 午夜视频久久久| 麻豆精品视频在线观看视频| 欧美极品一区| 国产无一区二区| 亚洲美女中文字幕| 欧美一级二级三级蜜桃| 欧美bbbxxxxx| 国产欧美午夜| av不卡在线观看| 欧美中文字幕视频| 欧美日韩久久精品| 好吊妞**欧美| 亚洲一区二区在线观看视频| 免费高清在线一区| 国产精品午夜电影| 亚洲精品偷拍| 久久精品国产99国产精品| 欧美视频中文一区二区三区在线观看| 国产一区二区三区在线观看精品 | 国内久久婷婷综合| 99在线热播精品免费| 久久先锋资源| 国产日韩欧美麻豆| 亚洲视频播放| 欧美久久久久久蜜桃| 一区二区视频免费完整版观看| 一本久久a久久免费精品不卡| 久久亚洲国产精品一区二区| 国产伦精品一区| 99精品视频免费观看| 久久香蕉国产线看观看av| 国产精品综合久久久| 在线一区欧美| 欧美日韩黄色一区二区| 亚洲精品小视频在线观看| 久久婷婷色综合| 红桃视频成人| 久久久久久久久蜜桃| 国产视频一区在线观看| 午夜精品久久久久久久| 国产精品视频一二| 亚洲一区二区三区乱码aⅴ蜜桃女| 欧美激情精品久久久久久大尺度| 在线观看欧美日韩国产| 久久久国产精品一区二区三区| 国产日韩欧美自拍| 欧美一区二区视频免费观看| 国产片一区二区| 欧美一区二区三区在线观看 | 亚洲视频 欧洲视频| 欧美日韩成人精品| 在线观看成人小视频| 狠狠做深爱婷婷久久综合一区| 欧美一区午夜精品| 欧美成人免费视频| 国产在线精品二区| 久久精品国产视频| 一区三区视频| 免费一区二区三区| 亚洲国产一区二区三区在线播| 欧美一区二区三区免费大片| 亚洲一二三区在线| 国产美女诱惑一区二区| 久久精品九九| 亚洲国产成人精品久久久国产成人一区 | 影音先锋一区| 毛片基地黄久久久久久天堂| 亚洲国产精品成人一区二区| 欧美经典一区二区三区| 一区二区不卡在线视频 午夜欧美不卡'| 欧美日韩国内| 性欧美超级视频| 亚洲高清视频一区| 国产精品免费一区二区三区在线观看| 亚洲欧洲av一区二区| 激情欧美丁香| 欧美日韩综合视频网址| 欧美一区激情视频在线观看| 雨宫琴音一区二区在线| 欧美日韩调教| 久久久亚洲影院你懂的| 中日韩高清电影网| 黄色成人av| 欧美调教vk| 久久婷婷国产麻豆91天堂| 亚洲免费电影在线观看| 国产一区二区三区黄| 欧美日韩一区二区视频在线| 久久久亚洲影院你懂的| 亚洲一区国产一区| 亚洲国产一区二区a毛片| 国产精品无人区| 欧美精品乱人伦久久久久久| 久久国产66| 亚洲视频axxx| 亚洲精品精选| 在线观看欧美亚洲| 国产人成一区二区三区影院| 欧美日韩在线精品一区二区三区| 久久精品一区二区国产| 亚洲欧美视频一区二区三区| 亚洲精品在线电影| 伊人成人在线视频| 国产一级一区二区| 国产精品影音先锋| 欧美日韩岛国| 欧美极品色图| 欧美a级理论片| 久久一区二区三区国产精品| 欧美一级视频一区二区| 亚洲视频在线观看网站| 日韩午夜av在线| 亚洲精品日产精品乱码不卡| 在线精品国产欧美| 樱花yy私人影院亚洲| 国语精品中文字幕| 黄色精品一区二区| 韩国一区二区在线观看| 韩国三级电影久久久久久| 国产在线拍揄自揄视频不卡99| 国产精品视频你懂的| 国产精品入口| 国产一区二区三区免费不卡| 国产欧美va欧美不卡在线| 国产精品视频一| 国产日韩综合| 一区视频在线看| 亚洲国产天堂久久国产91| 在线免费观看日韩欧美| 亚洲福利在线看| 亚洲精品国产精品国产自| 亚洲精品一区二区在线| 日韩亚洲不卡在线| 亚洲伊人观看| 久久久久一本一区二区青青蜜月| 久久久综合网站| 女女同性精品视频| 欧美日韩国产三区| 国产精品―色哟哟| 精品成人国产| 亚洲激情网站| 亚洲视频你懂的| 久久久久久91香蕉国产| 欧美韩日一区| 国产精品青草综合久久久久99| 国产亚洲成av人在线观看导航| 国外成人性视频| 亚洲免费av网站| 午夜在线一区二区| 欧美sm视频| 国产精品另类一区| 精品粉嫩aⅴ一区二区三区四区| 亚洲国产综合在线| 亚洲深夜激情| 久久精品国产成人| 欧美伦理影院| 国产一区二区激情| 99xxxx成人网| 久久久久久久久久看片| 欧美精品日韩一本| 国产午夜精品视频免费不卡69堂| 亚洲韩国青草视频| 亚洲字幕在线观看| 欧美国产免费| 国内精品美女在线观看| 一区二区三区精品视频在线观看| 久久超碰97人人做人人爱| 欧美日韩免费观看一区=区三区 | 免费观看国产成人| 国产精品老牛| 日韩视频―中文字幕| 久久亚洲综合色一区二区三区| 国产精品福利网| 91久久精品一区二区别| 欧美中文在线视频| 国产精品久久久久久久久久久久久久 | 在线不卡a资源高清| 亚洲午夜免费福利视频| 欧美黄色精品| 亚洲国产mv| 久久久国产精品一区| 国产免费成人av| 一本色道久久综合狠狠躁篇的优点 | 日韩午夜一区| 美女主播一区| 黄色小说综合网站| 久久精品一区二区| 国产一区欧美日韩| 欧美一区二区高清| 国产精品羞羞答答xxdd| 亚洲一区二区欧美日韩| 欧美亚洲第一区|