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爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          9000px;">

                香蕉久久夜色精品国产使用方法| 国产亚洲精品精华液| 久久久青草青青国产亚洲免观| 天天免费综合色| 亚洲精品一卡二卡| 精品不卡在线视频| 99久久精品免费看国产免费软件| 亚洲成人精品在线观看| 久久97超碰色| 国产精品一级黄| 不卡一区二区三区四区| 亚洲视频一二三区| 亚洲最色的网站| 日本在线不卡视频一二三区| 日韩精彩视频在线观看| 日韩精品久久久久久| 日本91福利区| www.欧美色图| 欧美人xxxx| 亚洲欧美日韩国产另类专区| 一区二区三区加勒比av| 成人一区在线看| 91麻豆123| 国产精品乱码久久久久久| |精品福利一区二区三区| 亚洲免费av高清| 久久国产剧场电影| 欧美性大战久久久| 免费成人在线观看视频| 亚洲第一激情av| 成人免费视频一区二区| 99久久精品国产精品久久| 欧美一区二区播放| 亚洲欧洲精品成人久久奇米网| 综合久久国产九一剧情麻豆| 国产日韩精品一区二区浪潮av | 国产午夜久久久久| 亚洲日本一区二区三区| 亚洲国产另类av| 国产精品一区二区久久精品爱涩 | 国产高清在线精品| 色av一区二区| 国产精品不卡在线| 国产精品综合一区二区三区| 欧美精品1区2区| 亚洲欧洲精品一区二区三区不卡 | 美女视频免费一区| 99精品欧美一区二区蜜桃免费| 91精品免费在线| 亚洲综合色婷婷| 99精品视频一区| 亚洲欧洲一区二区三区| 在线精品观看国产| 中文字幕一区二区三区在线播放| 欧美性猛交xxxxxx富婆| 一区二区三区国产豹纹内裤在线| 丰满岳乱妇一区二区三区| 欧美国产一区在线| 亚洲日本在线视频观看| 国产精品一区二区在线播放| 欧美日本一区二区三区四区| 日av在线不卡| 日韩一区二区三区电影| 欧美一区二区三区影视| 天天综合色天天| 欧美一级免费观看| 黄色成人免费在线| 日本一区二区三区在线不卡 | 一区二区久久久久久| 欧美国产日韩一二三区| 欧美日韩精品久久久| 中文字幕欧美激情| 欧美三级中文字幕在线观看| 国产一区在线看| 亚洲激情av在线| 亚洲v日本v欧美v久久精品| 国产午夜精品一区二区三区视频| 91香蕉视频mp4| 久久国产精品99久久人人澡| 日韩美女视频一区二区| 免费观看成人av| 亚洲精品菠萝久久久久久久| 国产欧美精品区一区二区三区 | 国内精品国产成人国产三级粉色| 亚洲精品视频免费观看| 国产精品色哟哟| 日韩一区二区视频| 欧美三级日韩在线| 五月天亚洲婷婷| 精品国产露脸精彩对白| 国产成人av电影免费在线观看| 成人午夜碰碰视频| 亚洲国产精品久久人人爱蜜臀 | 1000精品久久久久久久久| 一区二区激情小说| 福利电影一区二区三区| 日韩av中文字幕一区二区| 成人av网站在线观看免费| 欧美一二三区精品| 亚洲成人福利片| 99精品视频一区| 国产亚洲午夜高清国产拍精品| 2欧美一区二区三区在线观看视频| 丝袜亚洲另类欧美| 99精品视频在线免费观看| 久久蜜桃av一区二区天堂| 视频一区欧美日韩| 欧美性色综合网| 精品精品国产高清一毛片一天堂| 美国十次了思思久久精品导航| 欧美精品三级在线观看| 亚洲一区二区五区| 欧美日韩亚洲综合一区二区三区| 亚洲精品欧美激情| 成人性生交大合| 久久综合中文字幕| 九色|91porny| 久久99精品久久久久久动态图| 丁香亚洲综合激情啪啪综合| 欧美成人三级在线| 麻豆国产精品一区二区三区 | 欧美久久免费观看| 国产精品亚洲成人| 国产精品一区一区| 色悠久久久久综合欧美99| 欧美视频精品在线观看| 日韩伦理免费电影| 国产精选一区二区三区| 欧美日韩亚洲综合在线 | 久久综合综合久久综合| 在线观看成人小视频| 免费成人在线网站| 亚洲免费在线观看| 欧美精品一区二区三区蜜桃| 91网址在线看| 国产成人免费高清| 国产婷婷一区二区| 国产精品白丝jk白祙喷水网站| 欧美岛国在线观看| 国产一区二区免费视频| 精品国产三级a在线观看| 日本人妖一区二区| 精品久久五月天| 亚洲欧美日韩国产手机在线| 免费观看在线综合色| 欧美一区二区女人| 国产精品美日韩| 欧美日韩国产123区| 洋洋成人永久网站入口| 日韩一区二区电影在线| 国产精品综合av一区二区国产馆| 久久亚洲影视婷婷| 欧美天堂一区二区三区| 国产精品1024| 日韩一区精品字幕| 亚洲综合色网站| 在线观看日韩高清av| 成人激情免费视频| 国产精品一二三四| 韩国成人精品a∨在线观看| 亚洲18色成人| 亚洲精品精品亚洲| 国产精品第13页| 国产人伦精品一区二区| 欧美不卡一区二区三区四区| 日韩免费观看高清完整版| 91.xcao| 日韩一级片在线观看| 91视频国产资源| 国产酒店精品激情| 国产成人亚洲精品青草天美| 成人中文字幕电影| 免费成人结看片| 一级精品视频在线观看宜春院| 亚洲国产成人tv| 日本欧美大码aⅴ在线播放| 亚洲在线免费播放| 欧美极品aⅴ影院| 亚洲女与黑人做爰| 亚洲第一成人在线| 国产精品一区二区x88av| 国产在线视视频有精品| 高清av一区二区| 欧美高清视频一二三区 | 粗大黑人巨茎大战欧美成人| 国产精品久久影院| 91福利在线看| 粉嫩一区二区三区性色av| 欧美人与性动xxxx| 一区二区三区日韩精品视频| 国产美女娇喘av呻吟久久| 91精品国产一区二区三区香蕉| 日本中文字幕一区二区视频 | 免费一级片91| 欧美日韩亚洲高清一区二区| 亚洲人成精品久久久久久| 日本中文字幕一区| 欧美大度的电影原声| 色诱亚洲精品久久久久久| 国产伦理精品不卡|