Project
01 /*** 02 * Public Class to Get to Know Me 03 * 04 * @author rayanb 05 * @version 2023 06 * 07 ***/ 08 public class AboutMe { 09 10 // Personal Info 11 private static final String NAME = "Rayan Bouhal"; 12 private static final String PROFESSION = "Computer Science Student"; 13 private static final String LOCATION = "Virginia Tech"; 14 private static final int CLASS_YEAR = 2024; 15 private static final String[] SKILLS = {"Problem Solving", "Creativity", "Tenacity"}; 16 private static final String[] HOBBIES = {"Coding", "Cooking", "Soccer"}; 17 18 /*** 19 * 20 * Print Introduction 21 * 22 ***/ 23 public void introduction() { 24 System.out.println("Hello! My name is " + NAME); 25 System.out.println("I am a " + PROFESSION + " at " + LOCATION); 26 } 27 28 /*** 29 * 30 * Print Graduation 31 * 32 ***/ 33 public void experience() { 34 System.out.println("I am graduating in " + CLASS_YEAR); 35 } 36 37 /*** 38 * 39 * Some of my best skills 40 * 41 ***/ 42 public void skills() { 43 StringBuilder builder = new StringBuilder(); 44 builder.append("I possess a diverse set of skills including: "); 45 for (int i = 0; i < SKILLS.length; i++ ) { 46 47 if (i > 0 ){ 48 builder.append(i == SKILLS.length - 1 ? ", and " : ", "); 49 } 50 51 builder.append(SKILLS[i]); 52 53 } 54 55 System.out.println(builder); 56 } 57 58 /*** 59 * 60 * Work hard, play harder 61 * 62 ***/ 63 public void hobbies() { 64 StringBuilder builder = new StringBuilder(); 65 builder.append("In my free time, I enjoy: "); 66 for (int i = 0; i < HOBBIES.length; i++ ) { 67 68 if (i > 0 ){ 69 builder.append(i == HOBBIES.length - 1 ? ", and " : ", "); 70 } 71 72 builder.append(HOBBIES[i]); 73 74 } 75 76 System.out.println(builder); 77 } 78 79 /*** 80 * 81 * Main Method 82 * 83 ***/ 84 public static void main(String[] args) { 85 AboutMe aboutMe = new AboutMe(); 86 aboutMe.introduction(); 87 aboutMe.experience(); 88 aboutMe.skills(); 89 aboutMe.hobbies(); 90 } 91 }
01 /*** 02 * Public Class to Get to Know Me 03 * 04 * @author rayanb 05 * @version 2023 06 * 07 ***/ 08 public class AboutMe { 08 09 // Personal Info 10 private static final String 11 NAME = "Rayan Bouhal"; 12 private static final String 13 PROFESSION = "CS Student"; 14 private static final String 15 LOCATION = "Virginia Tech"; 16 private static final int 17 CLASS_YEAR = 2024; 18 private static final String[] 19 SKILLS = {"Problem Solving", 20 "Creativity", 21 "Tenacity"}; 22 private static final String[] 23 HOBBIES = {"Coding", 24 "Cooking", 25 "Soccer"}; 26 27 /*** 28 * 29 * Print Introduction 30 * 31 ***/ 32 public void introduction() { 33 System.out.println( 34 "Hello! My name is " + NAME); 35 System.out.println( 36 "I am a " + PROFESSION 37 + " at " + LOCATION); 38 } 39 40 41 /*** 42 * 43 * Print Graduation 44 * 45 ***/ 46 public void experience() { 47 System.out.println( 48 "I am graduating in " 49 + CLASS_YEAR); 50 } 51 52 /*** 53 * 54 * Some of my best skills 55 * 56 ***/ 57 public void skills() { 58 StringBuilder builder = 59 new StringBuilder(); 60 builder.append( 61 "I possess a diverse set of 62 skills including: "); 63 int len = SKILLS.length; 64 for (int i = 0; i < len; i++ ) { 65 66 if (i > 0 ){ 67 builder.append( 68 i == len - 1 ? ", & " : ", "); 69 } 70 71 builder.append(SKILLS[i]); 72 73 } 74 75 System.out.println(builder); 76 } 77 78 /*** 79 * 80 * Work hard, play harder 81 * 82 ***/ 83 public void hobbies() { 84 StringBuilder builder = 85 new StringBuilder(); 86 builder.append( 87 "In my free time, I enjoy: "); 88 int len = HOBBIES.length; 89 for (int i = 0; i < len; i++ ) { 90 91 if (i > 0 ){ 92 builder.append( 93 i == len - 1 ? ", & " : ", "); 94 } 95 96 builder.append(HOBBIES[i]); 97 98 } 99 100 System.out.println(builder); 101 } 102 103 /*** 104 * 105 * Main Method 106 * 107 ***/ 108 public static void main(String[] args) { 109 AboutMe aboutMe = new AboutMe(); 110 aboutMe.introduction(); 111 aboutMe.experience(); 112 aboutMe.skills(); 113 aboutMe.hobbies(); 114 } 115 }
rayanb@My-Website % javac AboutMe.java
rayanb@My-Website % java AboutMe.java
Hello! My name is Rayan Bouhal
I am a Computer Science Student at Virginia Tech
I am graduating in 2024
I possess a diverse set of skills including: Problem Solving, Creativity, and Tenacity
In my free time, I enjoy: Coding, Cooking, and Soccer
rayanb@My-Website % ▐
rayanb@My-Website % javac AboutMe.java
rayanb@My-Website % java AboutMe.java
Hello! My name is Rayan Bouhal
I am a CS Student at Virginia Tech
I am graduating in 2024
I possess a diverse set of skills including: Problem Solving, Creativity, & Tenacity
In my free time, I enjoy: Coding, Cooking, & Soccer
rayanb@My-Website % ▐