Career Guidance AI
import java.sql.Time;
import java.util.Random;
import java.util.Scanner;
import java.util.concurrent.TimeUnit;
public class career {
static void loading(){
System.out.print("Loading");
for (int a =1;a<3;a++){
System.out.print("...");
try {
TimeUnit.SECONDS.sleep(2);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
System.out.println(" ");
}
static void hold(int y){
try {
TimeUnit.SECONDS.sleep(y);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
public static void main(String[] args){
Random ra=new Random();
Scanner sc=new Scanner(System.in);
hold(2);
System.out.print("Hey!");
hold(1);
System.out.print(" I am ARTEMIS. ");
hold(2);
System.out.println("Your personal AI");
hold(2);
System.out.print("And I am here to tell you");
hold(1);
System.out.println(" what job suits you the best");
System.out.println(" ");
hold(3);
System.out.println("Do you wish to continue?( y/n )");
String start = sc.next();
System.out.println(" ");
hold(1);
if (start.equals("n")){
System.out.println("Oh! I guess you are not interested");
System.out.println("loss is all yours");
System.exit(0);
}
else if (start.equals("y")){
System.out.println("Very well ;) Lets begin");
}
else {
System.out.println("I guess you are not a very smart person");
System.out.println("I thought you will get that you have to answer in 'y' or 'n'");
System.exit(0);
}
hold(2);
// STRINGS
String[] names={"That is a beautiful name","That is not a very good name",
"That seems to be a pretty common name","wow! What a unique name"};
//0-Bio
//1-Economics
//2-Physics
//3-computer
//4-arts
//5-Teaching
String[][] car={
{"Psychologist"," Physician assistant"," Physician/Surgeon","Agricultural Food Scientist","Pharmacist","Animal Breeder","Conservation Scientist","Environmental Engineer and Technician","Environmental Scientist","Farmer or Rancher","Fish and Game Warden or Conservation Officer","Fish Hatchery Manager","Fisher","Forester","Geophysicist",""},
{"Management analyst","Financial analyst","Chief executive","Accountant or Auditor","Administrative Assistant or Secretary ","Budget Analyst","Customer Service Representative","Employment and Placement Specialist","File Clerk","Proofreader","Statistician"},
{"Civil engineer","Physical scientist","Engineer","Electrician"},
{"Computer programmer","Software developer","Computer and information systems manager"},
{"Lawyer","Actor","Art Director","Audio or Video Equipment Technician","Broadcast News Anchor","Dancer/Choreographer","Fashion Designer","Graphic Designer","Makeup Artist","Musician or Singer"},
{"Education Administrator","Elementary School Teacher","Fitness Trainer","Post-Secondary Teacher","School Counselor/Social Worker/Psychologist","Training Specialist or Manager"}};
//Personal Info
System.out.println(" ");
System.out.println("Are you male? (y/n)");
String gender = sc.next();
System.out.println(" ");
hold(1);
System.out.println("What is your name?");
String name = sc.next();
System.out.println(" ");
hold(1);
System.out.println(name+", "+names[ra.nextInt(3)]);
System.out.println(" ");
hold(1);
System.out.println("what field are you in? (science,economics,arts)");
String field=sc.next();
System.out.println(" ");
hold(1);
System.out.println("How good are you in dealing with children? Rate yourself on the scale of 0 to 10");
float childrate = sc.nextFloat();
System.out.println(" ");
hold(1);
if (childrate<5){
System.out.println("That's pretty bad");
}
else if(childrate>=5 && childrate<=7){
System.out.println("You are not bad but can be improved");
}
else if (childrate>7 && childrate<=10){
System.out.println("That's amazing !!");
}
else {
System.out.println("I guess you don't know how to rate yourself");
}
hold(1);
System.out.println(" ");
System.out.println("Did you have Biology as a subject?(y/n)");
String bio= sc.next();
System.out.println(" ");
hold(1);
System.out.println("Did you have computer as a subject?(y/n)");
String comp=sc.next();
System.out.println(" ");
hold(1);
float biorate=0;
if (bio.equals("y")){
System.out.println("If you have Biology, how much do you rate yourself out of 10");
biorate=sc.nextFloat();
System.out.println(" ");
}
float comrate=0;
if (comp.equals("y")){
System.out.println("If you have computer, how much do you rate yourself out of 10");
comrate=sc.nextFloat();
System.out.println(" ");
}
float phyrate=0;
if (field.equals("science")){
System.out.println("If you have physics, how much do you rate yourself out of 10");
phyrate=sc.nextFloat();
System.out.println(" ");
}
float ecorate=0;
if (field.equals("economics")){
System.out.println("If you have economics, how much do you rate yourself out of 10");
ecorate=sc.nextFloat();
System.out.println(" ");
}
System.out.println(" ");
hold(1);
System.out.println("OK, NOW LET'S SEE WHAT SUITS YOU THE BEST");
System.out.println(" ");
String career=new String();
loading();
if (field.equals("science") && bio.equals("y") && biorate>6 && phyrate<8){
career=car[0][ra.nextInt(car[0].length)];
}
else if (field.equals("science") && comp.equals("y") && comrate>6 && phyrate<8){
career=car[3][ra.nextInt(car[3].length)];
}
else if (field.equals("science") && phyrate>=8) {
career = car[2][ra.nextInt(car[2].length)];
}
else if (field.equals("economics") && ecorate>6){
career=car[1][ra.nextInt(car[1].length)];
}
else if (field.equals("arts")){
career=car[4][ra.nextInt(car[4].length)];
}
else if (childrate>5){
career=car[5][ra.nextInt(car[5].length)];
}
else {
career="Nothing";
}
loading();
System.out.println(" ");
System.out.println("What You can be in future is :");
System.out.println(" ");
System.out.println(" ");
hold(3);
System.out.println("********");
System.out.println(" ");
System.out.println(career);
System.out.println(" ");
System.out.println("********");
}
}