Jose Vidal shared this file. Want to do more with it?
importjava.util.Scanner;
publicclassRoommate{
/**
*@param args
*/
publicstaticvoidmain(String[] args){
Scanner keyboard =newScanner(System.in);
System.out.println("I will tell you what kind of roommate you are.");
System.out.println("Do you have a job? (YES or NO)");
String response = keyboard.nextLine();
if(response.equalsIgnoreCase("yes")){
System.out.println("Are you in a relationship? (YES or NO)");
if(keyboard.nextLine().equalsIgnoreCase("yes")){
System.out.println("Does you bf/gf have a roommate? (YES or NO)");
if(keyboard.nextLine().equalsIgnoreCase("yes")){
System.out.println("You are The Lover");
}
else{//other no roommate
System.out.println("You are The Ghost");
}
}
else{//no relationshiop
System.out.println("Oh gees, did you get dumped again? (YES or NO)");
if(keyboard.nextLine().equalsIgnoreCase("yes")){
System.out.println("You are The Derelict");
}
else{//not dumped
System.out.println("You are The Night Owl");
}
}
}
else{//no job
System.out.println("Do your parents love you? (YES or NO)");
if(keyboard.nextLine().equalsIgnoreCase("yes")){
System.out.println("You are The Prodigal Son");
}
else{//no love
System.out.println("You are The Freeloader");
}
}
}
}
We use cookies to provide, improve, protect and promote our services. Visit our Privacy Policy and Privacy Policy FAQs to learn more. You can manage your personal preferences, including your ‘Do not sell or share my personal data to third parties’ setting using the “Customize cookies” button below.