Commit 8c009792 authored by Shaik Afreed's avatar Shaik Afreed

ai model

parent f11ba78d
# Default ignored files
/shelf/
/workspace.xml
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/sample.ai.iml" filepath="$PROJECT_DIR$/.idea/sample.ai.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
\ No newline at end of file
import java.util.Arrays;
import java.util.Scanner;
public class Ai_Model {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("Enter the shape (e.g., round, oval, etc.): ");
String shape = scanner.nextLine().toLowerCase();
System.out.println("Enter the outer color (e.g., green, yellow, etc.): ");
String color = scanner.nextLine().toLowerCase();
System.out.println("Enter the No.of Wheels");
String wheels = scanner.nextLine().toLowerCase();
System.out.println("Enter the Brand");
String brand = scanner.nextLine().toLowerCase();
// System.out.println("Enter the inner color (e.g., red, white, etc.): ");
// String innerColor = scanner.nextLine().toLowerCase();
System.out.println("Enter its Juicy/Hard");
String inside = scanner.nextLine().toLowerCase();
if (shape.equals("round") && color.equals("green") && inside.equals("Juicy")) {
System.out.println("It's a watermelon!");
} else if (shape.equals("round")|| Arrays.asList("yellow","green").contains(color) || inside.equals("Hard")) {
System.out.println("It's a melon!");
} else if (shape.equals("oval") || color.equals("cream") && inside.equals("Hard")) {
System.out.println("It's a cantaloupe!");
} else if (Arrays.asList("white","black","red","grey","purple").contains(color) || Arrays.asList("two","2","four","4").contains(wheels)||Arrays.asList("ducati","bmw","kavasaki","yamaha").contains(brand)) {
System.out.println("It's a Bike");
} else {
System.out.println("Object not recognized.");
}
scanner.close();
}
}
# Default ignored files
/shelf/
/workspace.xml
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/sample.ai.iml" filepath="$PROJECT_DIR$/.idea/sample.ai.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
\ No newline at end of file
it's an sample ai ..each java files have different types of ai thing.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment