← all problems

BonusDesk.comboBonusReport 🌶️🌶️🌶️

Below is a partially written BonusDesk class. It already has two methods: addAmount(n, amount), which adds amount to n, and doubleIt(n), which doubles n. Neither one by itself does what you need. Write the comboBonusReport method: first add amount to base using addAmount, then double THAT result using doubleIt, then print exactly one line: "Combo bonus: " followed by the final number. For example, comboBonusReport(5, 3) should first compute 5 + 3 = 8, then double it to 16, and print "Combo bonus: 16".

BonusDesk.java — the class below is already written; you're only completing the method in the editable box.

class BonusDesk {
    public static int addAmount(int n, int amount) {
        return n + amount;
    }

    public static int doubleIt(int n) {
        return n * 2;
    }
    // ---- write your method below ----
}