Commit ecbbd156 authored by areej.mohammad's avatar areej.mohammad

step 2

parent 45ad6cc9
package hackingrace;
//Base Hacker Thread:
public abstract class HackerThread extends Thread {
protected final Vault vault;
public HackerThread(Vault vault,String name)
......@@ -9,10 +9,11 @@ public HackerThread(Vault vault,String name)
}
// Subclasses must implement their specific guessing strategy
@Override
public abstract void run();
//Called when the correct password is found
protected void onHacked(int password){
System.out.printf("*** % WINS! The vault has been hacked with password: %d ****\n",
this.getName(),password);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment