import java.util.Scanner;
public class SocialEaseSimulator {
// Analyze user's confidence based on simple rules
public static String analyzeConfidence(String text) {
int length = text.length();
int hesitationCount = 0;
if (text.contains("um") || text.contains("uh")) {
hesitationCount++;
}
if (length < 20) {
return "Try to speak a little more. You can do it 🙂";
} else if (hesitationCount > 0) {
return "You sound nervous. Try to reduce hesitation words.";
} else {
return "Great confidence! 👍 You expressed yourself clearly.";
}
}
// Detect simple emotion
public static String detectEmotion(String text) {
text = text.toLowerCase();
if (text.contains("nervous") || text.contains("scared")) {
return "Detected Emotion: Nervous 😟";
} else if (text.contains("happy") || text.contains("excited")) {
return "Detected Emotion: Confident 😊";
} else {
return "Detected Emotion: Neutral 😐";
}
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("=== SOCIAL EASE SIMULATOR ===");
System.out.println("Scenario: Job Interview");
System.out.println("Question: Tell me about yourself.");
System.out.print("\nYour Answer: ");
String userInput = sc.nextLine();
System.out.println("\n--- Analysis Result ---");
System.out.println(detectEmotion(userInput));
System.out.println(analyzeConfidence(userInput));
System.out.println("\nKeep practicing! Every attempt builds confidence 💪");
sc.close();
}
}