@@ -0,0 +1,1249 @@
+package com.hackerrank.contests.daysOfCode_30;%0A%0Aimport java.util.Scanner;%0A%0Apublic class Day4_LogicalOperatorsClassVsInstance %7B%0A%0A%09int age;%0A%0A%09public Day4_LogicalOperatorsClassVsInstance(int initial_Age) %7B%0A%09%09// Add some more code to run some checks on initial_Age%0A%09%09if (initial_Age %3C 0)%7B%0A%09%09%09System.out.println(%22This person is not valid, setting age to 0.%22);%0A%09%09%7D else %7B%0A%09%09%09this.age = initial_Age;%0A%09%09%7D%0A%09%09%09%0A%09%7D%0A%0A%09public void amIOld() %7B%0A%09%09// Do some computations in here and print out the correct statement to the console%0A%09%09// using System.out.println()...%0A%09%09%0A%09%09if (age %3C 13) %7B%0A%09%09%09System.out.println(%22You are young.%22);%0A%09%09%7D else if (age %3E= 13 && age %3C 18) %7B%0A%09%09%09System.out.println(%22You are a teenager.%22);%0A%09%09%7D else %7B%0A%09%09%09System.out.println(%22You are old.%22);%0A%09%09%7D%0A%09%7D%0A%0A%09public void yearPasses() %7B%0A%09%09// Increment the age of the person in here%0A%09%09age++;%0A%09%7D%0A%0A%09public static void main(String%5B%5D args) %7B%0A%09%09@SuppressWarnings(%22resource%22)%0A%09%09Scanner sc = new Scanner(System.in);%0A%09%09int T = sc.nextInt();%0A%09%09for (int i = 0; i %3C T; i++) %7B%0A%09%09%09int age = sc.nextInt();%0A%09%09%09Day4_LogicalOperatorsClassVsInstance p = new Day4_LogicalOperatorsClassVsInstance(age);%0A%09%09%09p.amIOld();%0A%09%09%09for (int j = 0; j %3C 3; j++) %7B%0A%09%09%09%09p.yearPasses();%0A%09%09%09%7D%0A%09%09%09p.amIOld();%0A%09%09%09System.out.println();%0A%09%09%7D%0A%09%7D%0A%0A%7D%0A

Create Day4_LogicalOperatorsClassVsInstance.java