ShowMyInfo program

This commit is contained in:
HeshamTB 2020-08-30 11:16:41 +03:00
commit b47513a6f3
Signed by: Hesham
GPG Key ID: 74876157D199B09E
8 changed files with 56 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.class

3
lab-0/.idea/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml

6
lab-0/.idea/misc.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

8
lab-0/.idea/modules.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/lab-0.iml" filepath="$PROJECT_DIR$/lab-0.iml" />
</modules>
</component>
</project>

6
lab-0/.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>

View File

@ -0,0 +1,7 @@
/usr/lib/jvm/java-11-openjdk/bin/java -javaagent:/usr/share/idea/lib/idea_rt.jar=45631:/usr/share/idea/bin -Dfile.encoding=UTF-8 -classpath /home/hesham/Dev/EE364-lab/lab-0/out/production/lab-0 ShowMyInfo
Enter your name: Hesham
Enter your age: 23
Welcome Hesham, your age is 23
Process finished with exit code 0

11
lab-0/lab-0.iml Normal file
View File

@ -0,0 +1,11 @@
<?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$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

14
lab-0/src/ShowMyInfo.java Normal file
View File

@ -0,0 +1,14 @@
import java.util.Scanner;
public class ShowMyInfo {
public static void main(String args[]){
Scanner input = new Scanner(System.in);
String name;
int age;
System.out.print("Enter your name: ");
name = input.nextLine();
System.out.print("Enter your age: ");
age = input.nextInt();
System.out.println("Welcome "+ name + ", your age is " + age);
}
}