1. import java.util.Scanner;
  2. 
  3. public class Roommate {
  4. 
  5. /**
  6. * @param args
  7. */
  8. public static void main(String[] args) {
  9. Scanner keyboard = new Scanner(System.in);
  10. System.out.println("I will tell you what kind of roommate you are.");
  11. System.out.println("Do you have a job? (YES or NO)");
  12. String response = keyboard.nextLine();
  13. if (response.equalsIgnoreCase("yes")) {
  14. System.out.println("Are you in a relationship? (YES or NO)");
  15. if (keyboard.nextLine().equalsIgnoreCase("yes")) {
  16. System.out.println("Does you bf/gf have a roommate? (YES or NO)");
  17. if (keyboard.nextLine().equalsIgnoreCase("yes")) {
  18. System.out.println("You are The Lover");
  19. }
  20. else { //other no roommate
  21. System.out.println("You are The Ghost");
  22. }
  23. }
  24. else { //no relationshiop
  25. System.out.println("Oh gees, did you get dumped again? (YES or NO)");
  26. if (keyboard.nextLine().equalsIgnoreCase("yes")) {
  27. System.out.println("You are The Derelict");
  28. }
  29. else { //not dumped
  30. System.out.println("You are The Night Owl");
  31. }
  32. }
  33. }
  34. else { //no job
  35. System.out.println("Do your parents love you? (YES or NO)");
  36. if (keyboard.nextLine().equalsIgnoreCase("yes")) {
  37. System.out.println("You are The Prodigal Son");
  38. }
  39. else { //no love
  40. System.out.println("You are The Freeloader");
  41. }
  42. }
  43. }
  44. 
  45. }