Heartbreak Hotel by Elvis Presley (in Java)

What follows in Java pseudocode for the lyrics to Elvis’ first gold record, Heartbreak Hotel, the spiritual and philosophical ramifications of which are one of all and sundry, give or take a few.

if (baby.getEndDate() != null) {
  setAddress(
    new Dwelling("HeartBreak Hotel", "Lonely Street"));
}

for (int i=0;i<3;i++) {
  loneliness++;
}
mood--;

if (crowded) { // crowded always true?
  Room room = new Room();
  room.setClientelle("BROKEN_HEARTED_LOVERS");
  room.setFunction("GLOOM_AVERSION_THERAPY");
  room.getInventory().add(new Carton("Tissues"));
  room.book();
}    

if (role() == BELL_HOP && teary()) {
  global_tear_count++;
  setResidency(PERMANENT);
}  

if (role() == DESK_CLERK &&
    getAttire.color() == Color.BLACK) {
  setResidency(PERMANENT);
}

if (recent(baby.getEndDate()) && !member()) {
  ambulate(getAddress("HeartBreak Hotel"));
}

Probably needs refactoring…

Subscribe Share
×

Subscribe

The latest articles sent straight to your inbox.