mirror of
https://github.com/Noratrieb/UselessClasses.git
synced 2026-01-14 16:45:09 +01:00
bobby
This commit is contained in:
parent
1bd6dda157
commit
95834b3586
3 changed files with 51 additions and 1 deletions
46
src/Buddy.java
Normal file
46
src/Buddy.java
Normal file
|
|
@ -0,0 +1,46 @@
|
||||||
|
import java.util.Scanner;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When you're really lonely in your code and you need a buddy
|
||||||
|
*/
|
||||||
|
public class Buddy {
|
||||||
|
/**
|
||||||
|
* The name of the Buddy, for example Bobby
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The scream of the buddy when it realizes that it's not real. No use cases for it. It's not self-conscious or anything like that. Yet. (the scream is a constant because the buddy will constantly be screaming (it's not a constant because of memory issues, simply call setSCREAM to be able to use it))
|
||||||
|
*/
|
||||||
|
public String SCREAM;
|
||||||
|
|
||||||
|
public Buddy(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void help(){
|
||||||
|
Scanner scn = new Scanner(System.in);
|
||||||
|
System.out.println("Hi my friend, I'm " + name);
|
||||||
|
System.out.println("What's you problem?");
|
||||||
|
scn.nextLine();
|
||||||
|
System.out.println("Sorry I can't help you with that because my code is very limited just like you ☜(゚ヮ゚☜)☜(゚ヮ゚☜)☜(゚ヮ゚☜)☜(゚ヮ゚☜)☜(゚ヮ゚☜)☜(゚ヮ゚☜)");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void joke() {
|
||||||
|
System.out.println("There 👉 is 😶 nothing ❌ funny 😂 about ↩ my 😀👈 life ♥.");
|
||||||
|
try {
|
||||||
|
Thread.sleep(300);
|
||||||
|
} catch (InterruptedException ignored) {
|
||||||
|
}
|
||||||
|
System.out.println("Wait, there is something.");
|
||||||
|
try {
|
||||||
|
Thread.sleep(1400);
|
||||||
|
} catch (InterruptedException ignored) {
|
||||||
|
}
|
||||||
|
System.out.println("You.");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSCREAM(){
|
||||||
|
SCREAM = "A".repeat(Integer.MAX_VALUE).repeat(Integer.MAX_VALUE).repeat(Integer.MAX_VALUE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -33,7 +33,7 @@ public class DecimalNumber {
|
||||||
System.out.println(ss[1]);
|
System.out.println(ss[1]);
|
||||||
integerPart = Long.parseLong(ss[0]);
|
integerPart = Long.parseLong(ss[0]);
|
||||||
decimalPart = Long.parseLong(ss[1]);
|
decimalPart = Long.parseLong(ss[1]);
|
||||||
} catch (NumberFormatException e){
|
} catch (NumberFormatException | ArrayIndexOutOfBoundsException e){
|
||||||
throw new ValueShouldProbablyActuallyBeANumberAndNotSomeWeirdGibberishDumbProgrammerException();
|
throw new ValueShouldProbablyActuallyBeANumberAndNotSomeWeirdGibberishDumbProgrammerException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,5 +11,9 @@ public class TestClass {
|
||||||
} catch (ValueShouldProbablyActuallyBeANumberAndNotSomeWeirdGibberishDumbProgrammerException e) {
|
} catch (ValueShouldProbablyActuallyBeANumberAndNotSomeWeirdGibberishDumbProgrammerException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Buddy bobby = new Buddy("bobby");
|
||||||
|
bobby.help();
|
||||||
|
bobby.joke();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue