A Fighter/Mage is one of the stronger multi-classes at the end of Baldur’s Gate 2, the seminal role-playing video game (cRPG) developed by BioWare

A Fighter/Mage is one of the stronger multi-classes at the end of Baldur’s Gate 2, the seminal role-playing video game (cRPG) developed by BioWare. For character creation of a Fighter/Mage, the highest dice rolls should be allocated to strength (STR), intelligence (INT), dexterity (DEX), and constitution (CON) – in that order – and the lower statistics should go into wisdom (WIS) and charisma (CHA). Fill in code at the three (3) places marked YOUR CODE HERE. Upload your program.

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Random;
public class Main {
public static class dndCharacter {
private String name;
private int STR;
private int INT;
private int DEX;
private int CON;
private int WIS;
private int CHA;
public dndCharacter(String myName) {
name = myName;
List statList = new ArrayList();
// get 6 random stats
for (int i = 0; i < 6; i++) { statList.add(characterStat()); } // order statList low to high Collections.sort(statList); // access elements with statList.get(index) for index f rom 0 to 5 // assign the character statistics high to low STR INT DEX CON WIS CHA // with values from the ordered statList // YOUR CODE HERE } public String about() { String aboutMe = “”; aboutMe += “Hi! My name is ” + name+”n”; aboutMe += “I am a Fighter/Mage”+”n”; if (STR + INT + DEX + CON + WIS + CHA > 6 * 9) {
aboutMe += “I am rather good at questingn”;
aboutMe += “Strength: ” + STR+”n”;
aboutMe += “Intelligence: ” + INT+”n”;
aboutMe += “Dexterity: ” + DEX+”n”;
aboutMe += “Constitution: ” + CON+”n”;
aboutMe += “Wisdom: ” + WIS+”n”;
aboutMe += “Charisma: ” + CHA+”n”;
} else {
aboutMe += “But enough about me…”;
}
// create the correct return statement
// YOUR CODE HERE
}
static int characterStat() {
Random random = new Random();
int d1 = random.nextInt(5) + 1;
int d2 = random.nextInt(5) + 1;
int d3 = random.nextInt(5) + 1;
int d4 = random.nextInt(5) + 1;
int diceSum = d1 + d2 + d3 + d4;
int min = Math.min(d1, d2);
min = Math.min(min, d3);
min = Math.min(min, d4);
diceSum -= min;
return diceSum;
}
}
public static void main(String[] args) {
// YOUR CODE HERE
// modify myName to initialize dndCharacter
Main.dndCharacter FighterMage = new dndCharacter(“”);
System.out.println(FighterMage.about());
}
}

Calculate your order
Pages (275 words)
Standard price: $0.00
Client Reviews
4.9
Sitejabber
4.6
Trustpilot
4.8
Our Guarantees
100% Confidentiality
Information about customers is confidential and never disclosed to third parties.
Original Writing
We complete all papers from scratch. You can get a plagiarism report.
Timely Delivery
No missed deadlines – 97% of assignments are completed in time.
Money Back
If you're confident that a writer didn't follow your order details, ask for a refund.

Calculate the price of your order

You will get a personal manager and a discount.
We'll send you the first draft for approval by at
Total price:
$0.00
Power up Your Academic Success with the
Team of Professionals. We’ve Got Your Back.
Power up Your Study Success with Experts We’ve Got Your Back.