⏰ 30 minutes MINI PROJECT · UNITS 1.1 + 1.2

🎮 Gamertag Forge

Time to combine everything: variables and operators from 1.1, and String methods from 1.2. You'll write a program that slices pieces out of your own name with substring, measures it with length(), computes your power level with operators, and forges them all into a one-of-a-kind gamertag. Nobody else's program prints your tag.

⏱ Your 30 minutes

0–3 minCopy the starter shell into Trinket or VS Code. Run it once — it should compile before you touch anything.
3–20 minForge: slice your name pieces, compute your power level, build the tag, print the reveal card.
20–25 minRun the Pre-Flight Check below and fix anything amber.
25–30 minShow Mr. Babb your running program, then forge a tag for the person next to you.

🎯 What it could look like

Example run for a player named Jordan Mitchell. Yours prints your tag — and the style of the card is yours to design.

*****************************
      GAMERTAG  FORGE
*****************************
 Player: Jordan Mitchell
 Letters in your name: 14
 Power level: 42
 >>> Your tag: JorMi42 <<<
*****************************
 Tag forged. Wear it well.
*****************************
The forge recipe (you may invent your own, as long as it uses substring + a computed number):
first 3 letters of your first name + first 2 letters of your last name + your power level
where power level = (firstName.length() + lastName.length()) * 3 — Jordan (6) + Mitchell (8) = 14, times 3 = 42.

📋 Requirements

R1
Declare at least 2 String variables (your first and last name) and at least 1 int whose value Java computes — not one you typed in yourself.
R2
Use .substring() at least twice — slice a piece from BOTH names — and .length() at least once.
R3
Build your tag into its own String variable using concatenation, like String tag = piece1 + piece2 + power; — then print the variable, not the pieces.
R4
Your power level must be computed with an operator (*, /, -, or %) using .length() values from your name.
R5
Print a reveal card: at least 5 println statements, with your tag and power level concatenated into the output.
Stretch goals: end your tag with a random digit using (int)(Math.random() * 10) · grow your tag with += · forge a second tag for the person next to you and print both cards.

📦 Starter shell

Copy this in and run it first. Then swap in your name and start forging where the comments point.

public class GamertagForge
{
    public static void main(String[] args)
    {
        // 1. YOUR NAME (swap in your own)
        String firstName = "Jordan";
        String lastName = "Mitchell";

        // 2. THE FORGE: slice substring pieces, compute your power level,
        //    and build your tag in its own String variable


        // 3. THE REVEAL CARD: print it with your tag inside
        System.out.println("*****************************");


        System.out.println("*****************************");
    }
}

🚀 Pre-Flight Check

Before you show Mr. Babb: paste your whole program below and hit the button. It checks your code against every requirement — green means go.

⚔️ TAG FORGED — all requirements detected.
Run it one more time, admire the card, and show Mr. Babb your screen.
Done early? Grab a stretch goal — the random-digit tag is the fan favorite.
Mr. Babb · AP Computer Science A · Paul Public Charter School