├── Armstrong.class ├── Armstrong.java ├── Armstrong1.class ├── Armstrong1.java ├── CORE JAVA.pdf ├── Calci.java ├── Calculator.class ├── Calculator.java ├── Divisor.class ├── Divisor.java ├── Divisorcount.class ├── Divisorcount.java ├── Dosa.class ├── Dosa.java ├── EBCalculator.class ├── EBCalculator.java ├── Findmultiples.class ├── Findmultiples.java ├── Findprime.class ├── Findprime.java ├── First.class ├── First.java ├── GCD.class ├── GCD.java ├── Gpay.java ├── LCM.class ├── LCM.java ├── LoopingPractices.class ├── LoopingPractices.java ├── MyFriend.java ├── Neon.class ├── Neon.java ├── Power.class ├── Power.java ├── Print.class ├── Print.java ├── Reverse.class ├── Reverse.java ├── School.class ├── School.java ├── SpyNumber.class ├── SpyNumber.java ├── Strong.class ├── Strong.java ├── Temple.class ├── Temple.java ├── Tenali.class ├── Tenali.java ├── Theatre.class ├── Theatre.java ├── casestudy 1.odt ├── casestudy2.odt ├── java course syllabus.pdf ├── java example programs.pdf ├── sample4.txt ├── sample5.txt ├── sample6.txt ├── sample7.txt ├── sample8.txt └── sample9.txt /Armstrong.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajitha-vijayakumar/JAVA/c9873a2a28e911f75d398c22a7f0e0eb9070bb50/Armstrong.class -------------------------------------------------------------------------------- /Armstrong.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | class Armstrong{ 3 | public static void main(String [] args) 4 | { 5 | Scanner sc = new Scanner(System.in); 6 | int num = sc.nextInt(); 7 | Armstrong call = new Armstrong(); 8 | int count = call.count_digits(num); 9 | call.find_armstrong(num,count); 10 | } 11 | void find_armstrong(int num,int count){ 12 | int given = num; 13 | int val = 0; 14 | int rem = 0; 15 | int pow = count; 16 | while(count>0) 17 | { 18 | rem = num%10; 19 | val = val + find_power(rem,pow); 20 | num = num/10; 21 | count--; 22 | } 23 | if(val==given) 24 | { 25 | System.out.println("The given number is an amstrong number"); 26 | } 27 | else 28 | { 29 | System.out.println("The given number is not an amstrong number"); 30 | } 31 | } 32 | 33 | 34 | int count_digits(int num) 35 | { 36 | int count =0; 37 | 38 | while(num>0) 39 | { 40 | count++; 41 | num=num/10; 42 | } 43 | return count; 44 | } 45 | 46 | 47 | int find_power(int base,int power) 48 | { 49 | int val = 1; 50 | while(power>0) 51 | { 52 | val = val*base; 53 | power--; 54 | } 55 | return val; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /Armstrong1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajitha-vijayakumar/JAVA/c9873a2a28e911f75d398c22a7f0e0eb9070bb50/Armstrong1.class -------------------------------------------------------------------------------- /Armstrong1.java: -------------------------------------------------------------------------------- 1 | class Armstrong1{ 2 | public static void main (String [] args) 3 | { 4 | Armstrong1 call = new Armstrong1(); 5 | int num = 127; 6 | int count = call.findcount(num); 7 | call.find_armstrong(num,count); 8 | } 9 | int findcount(int num) 10 | { 11 | int count =0; 12 | 13 | while(num>0) 14 | { 15 | count++; 16 | num=num/10; 17 | } 18 | return count; 19 | } 20 | void find_armstrong(int num,int count) 21 | { 22 | int given = num; 23 | int power = count; 24 | int rem =0; 25 | int sum = 0; 26 | while(count>0) 27 | { 28 | rem = num%10; 29 | sum = sum + find_power(rem,power); 30 | num = num/10; 31 | count = count-1; 32 | } 33 | if(given==sum) 34 | { 35 | System.out.println("Given number is a armstrong number"); 36 | } 37 | else{ 38 | System.out.println("Not an armstrong number"); 39 | } 40 | } 41 | int find_power(int base,int power) 42 | { 43 | int val = 1; 44 | while(power>0) 45 | { 46 | val = val*base; 47 | power--; 48 | } 49 | return val; 50 | } 51 | } 52 | 53 | 54 | -------------------------------------------------------------------------------- /CORE JAVA.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajitha-vijayakumar/JAVA/c9873a2a28e911f75d398c22a7f0e0eb9070bb50/CORE JAVA.pdf -------------------------------------------------------------------------------- /Calci.java: -------------------------------------------------------------------------------- 1 | package Calculator; 2 | import java.util.*; 3 | public class Calci { 4 | public static void main(String[] args) { 5 | Scanner sc = new Scanner(System.in); 6 | Calci call = new Calci(); 7 | System.out.println("Enter two numbers : "); 8 | int a = sc.nextInt(); 9 | int b = sc.nextInt(); 10 | call.calc(a,b); 11 | } 12 | 13 | void calc(int a, int b) { 14 | Scanner sc = new Scanner(System.in); 15 | System.out.println("For Addition enter '1' "); 16 | System.out.println("For Subtraction enter '2' "); 17 | System.out.println("For Multiplication enter '3' "); 18 | System.out.println("For Division enter '4' "); 19 | int input = sc.nextInt(); 20 | int res = operation(input,a,b); 21 | continuation(res); 22 | } 23 | void continuation(int res) { 24 | Scanner sc = new Scanner(System.in); 25 | System.out.println("Do you want to continue ? [Y/N] :"); 26 | char ch = sc.next().charAt(0); 27 | if(ch=='Y' || ch=='y') { 28 | System.out.println("Enter new input : "); 29 | int num2 = sc.nextInt(); 30 | calc(res,num2); 31 | }else if(ch=='n' || ch=='N') { 32 | System.out.println("Thank you for using!!"); 33 | }else { 34 | System.out.println("Invalid input ! Try again"); 35 | continuation(res); 36 | } 37 | } 38 | 39 | private int operation(int input,int f,int s) { 40 | int result = 0; 41 | if(input==1) 42 | { 43 | System.out.println("Addition of given numbers "+f+" + "+s + " = "+(f+s) ); 44 | result = f+s; 45 | } 46 | else if(input==2) 47 | { 48 | System.out.println("Subtraction of given numbers "+f+" - "+s + " = "+(f-s) ); 49 | result = f-s; 50 | 51 | } 52 | else if(input==3) 53 | { 54 | System.out.println("Multiplication of given numbers "+f+" * "+s + " ="+(f*s) ); 55 | result = f*s; 56 | 57 | } 58 | else if(input==4) 59 | { 60 | System.out.println("Division of given numbers "+f+" / "+s + " = "+(f/s) ); 61 | result = f/s; 62 | } 63 | else 64 | { 65 | System.out.println("Given choice is invalid enter valid option"); 66 | } 67 | return result; 68 | } 69 | 70 | 71 | } 72 | -------------------------------------------------------------------------------- /Calculator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajitha-vijayakumar/JAVA/c9873a2a28e911f75d398c22a7f0e0eb9070bb50/Calculator.class -------------------------------------------------------------------------------- /Calculator.java: -------------------------------------------------------------------------------- 1 | class Calculator 2 | { 3 | public static void main(String [] args) 4 | { 5 | Calculator calc = new Calculator(); 6 | int a=10,b=20; 7 | calc.add(a,b); 8 | calc.sub(a,b); 9 | } 10 | void add(a, b) 11 | { 12 | System.out.println(a+b); 13 | } 14 | void sub(int x, int y){ 15 | System.out.println(y-x); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Divisor.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajitha-vijayakumar/JAVA/c9873a2a28e911f75d398c22a7f0e0eb9070bb50/Divisor.class -------------------------------------------------------------------------------- /Divisor.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | class Divisor 3 | { 4 | public static void main(String [] args) 5 | { 6 | Scanner sc = new Scanner(System.in); 7 | int val = sc.nextInt(); 8 | Divisor call = new Divisor(); 9 | call.find_divisor(val); 10 | } 11 | void find_divisor(int num){ 12 | int count =1; 13 | while(count<=num) 14 | { 15 | if(num % count == 0) 16 | { 17 | System.out.println("Divisible by : " + count); 18 | } 19 | count ++; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Divisorcount.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajitha-vijayakumar/JAVA/c9873a2a28e911f75d398c22a7f0e0eb9070bb50/Divisorcount.class -------------------------------------------------------------------------------- /Divisorcount.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | class Divisorcount 3 | { 4 | public static void main(String [] args) 5 | { 6 | Scanner sc = new Scanner(System.in); 7 | int val = sc.nextInt(); 8 | Divisorcount call = new Divisorcount(); 9 | call.find_divisor_count(val); 10 | } 11 | void find_divisor_count(int num){ 12 | int count =0; 13 | int div =1; 14 | while(div<=num) 15 | { 16 | if(num % div == 0) 17 | { 18 | count ++; 19 | } 20 | div ++; 21 | } 22 | System.out.println("Divisors count :" + count); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Dosa.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajitha-vijayakumar/JAVA/c9873a2a28e911f75d398c22a7f0e0eb9070bb50/Dosa.class -------------------------------------------------------------------------------- /Dosa.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | class Dosa{ 3 | public static void main(String [] args) 4 | { 5 | Scanner sc = new Scanner(System.in); 6 | System.out.println("Enter the remaining Dosas "); 7 | int rem = sc.nextInt(); 8 | Dosa call = new Dosa(); 9 | call.find_count(rem); 10 | } 11 | void find_count(int rem) 12 | { 13 | int count=3; 14 | int sum = 0; 15 | int eaten = 0; 16 | while(count>0) 17 | { 18 | eaten = eaten + (rem/2); 19 | sum = rem + (rem/2); 20 | rem = sum; 21 | count--; 22 | } 23 | System.out.println("Total dosa's eaten : " + eaten ); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EBCalculator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajitha-vijayakumar/JAVA/c9873a2a28e911f75d398c22a7f0e0eb9070bb50/EBCalculator.class -------------------------------------------------------------------------------- /EBCalculator.java: -------------------------------------------------------------------------------- 1 | class EBCalculator 2 | { 3 | public static void main(String [] args) 4 | { 5 | EBCalculator reader= new EBCalculator(); 6 | int bill = reader.calculate_units(); 7 | System.out.println("bill="+bill); 8 | int amount = 500; 9 | reader.pay(amount,bill); 10 | } 11 | int calculate_units() 12 | { 13 | int units = 120; 14 | int price = 2; 15 | return units*price; 16 | } 17 | void pay(int a,int b){ 18 | System.out.println("balance="+(a-b)); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Findmultiples.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajitha-vijayakumar/JAVA/c9873a2a28e911f75d398c22a7f0e0eb9070bb50/Findmultiples.class -------------------------------------------------------------------------------- /Findmultiples.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | class Findmultiples{ 3 | public static void main(String [] srgs) 4 | { 5 | Scanner sc = new Scanner(System.in); 6 | System.out.println("Enter the number :"); 7 | int num = sc.nextInt(); 8 | System.out.println("Until which line do you want to print :"); 9 | int val = sc.nextInt(); 10 | Findmultiples call = new Findmultiples (); 11 | call.printtables(num,val); 12 | } 13 | void printtables(int num,int val) 14 | { 15 | int count = 1; 16 | while(count<=val) 17 | { 18 | System.out.println(count+" * "+num+" = "+(count * num)); 19 | count++; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Findprime.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajitha-vijayakumar/JAVA/c9873a2a28e911f75d398c22a7f0e0eb9070bb50/Findprime.class -------------------------------------------------------------------------------- /Findprime.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | class Findprime 3 | { 4 | public static void main(String [] args) 5 | { 6 | Scanner sc = new Scanner(System.in); 7 | int val = sc.nextInt(); 8 | Findprime call = new Findprime(); 9 | call.check_prime(val); 10 | } 11 | void check_prime(int num){ 12 | int count =0; 13 | int div =2; 14 | while(div<(num/2)) 15 | { 16 | if(num % div == 0) 17 | { 18 | count ++; 19 | } 20 | div ++; 21 | } 22 | if(count == 0) 23 | { 24 | System.out.println("Given number is Prime"); 25 | }else 26 | { 27 | System.out.println("Given number is not a Prime Number"); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /First.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajitha-vijayakumar/JAVA/c9873a2a28e911f75d398c22a7f0e0eb9070bb50/First.class -------------------------------------------------------------------------------- /First.java: -------------------------------------------------------------------------------- 1 | class First 2 | { 3 | public static void main(String [] args) 4 | { 5 | System.out.println("VANAKKAM ULAGAME"); 6 | 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /GCD.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajitha-vijayakumar/JAVA/c9873a2a28e911f75d398c22a7f0e0eb9070bb50/GCD.class -------------------------------------------------------------------------------- /GCD.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | class GCD{ 3 | public static void main(String [] args) 4 | { 5 | Scanner sc = new Scanner(System.in); 6 | GCD call = new GCD(); 7 | int num1= sc.nextInt(); 8 | int num2 = sc.nextInt(); 9 | call.find_common_divisors(num1,num2); 10 | } 11 | void find_common_divisors(int num1,int num2) 12 | { 13 | int div = 2; 14 | int gcd = 1; 15 | int small = (num1>num2)?num2:num1; 16 | while(div<=small){ 17 | if(num1%div == 0 && num2%div == 0) 18 | { 19 | gcd = div; 20 | } 21 | div = div +1; 22 | } 23 | System.out.println(gcd); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Gpay.java: -------------------------------------------------------------------------------- 1 | package OOPSLearning; 2 | 3 | public class Gpay { 4 | int pwd = 1234; 5 | } 6 | 7 | -------------------------------------------------------------------------------- /LCM.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajitha-vijayakumar/JAVA/c9873a2a28e911f75d398c22a7f0e0eb9070bb50/LCM.class -------------------------------------------------------------------------------- /LCM.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | class LCM{ 3 | public static void main(String [] args) 4 | { 5 | Scanner sc = new Scanner(System.in); 6 | LCM call = new LCM(); 7 | int num1= sc.nextInt(); 8 | int num2 = sc.nextInt(); 9 | call.find_common_multiples1(num1,num2); 10 | call.find_common_multiples2(num1,num2); 11 | } 12 | void find_common_multiples1(int num1,int num2) 13 | { 14 | int big = (num1>num2)?num1:num2; 15 | int mul =2; 16 | int lcm = 0; 17 | while(true){ 18 | if(big%num1==0 && big%num2==0) 19 | { 20 | lcm = big; 21 | break; 22 | }else 23 | { 24 | big = big * mul; 25 | mul = mul +1; 26 | } 27 | } 28 | System.out.println(lcm); 29 | } 30 | void find_common_multiples2(int num1,int num2) 31 | { 32 | int big = (num1>num2)?num1:num2; 33 | while(true){ 34 | if(big%num1==0 && big%num2==0) 35 | { 36 | System.out.println(big); 37 | break; 38 | } 39 | big = big + 1; 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /LoopingPractices.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajitha-vijayakumar/JAVA/c9873a2a28e911f75d398c22a7f0e0eb9070bb50/LoopingPractices.class -------------------------------------------------------------------------------- /LoopingPractices.java: -------------------------------------------------------------------------------- 1 | import java .util.*; 2 | 3 | public class LoopingPractices { 4 | 5 | public static void main(String[] args) { 6 | LoopingPractices today = new LoopingPractices(); 7 | Scanner in = new Scanner(System.in); 8 | System.out.println("Enter the first number:"); 9 | int no1=in.nextInt(); 10 | System.out.println("Enter the second number:"); 11 | int no2 = in.nextInt(); 12 | today.find_gcd(no1, no2); 13 | // TODO Auto-generated method stub 14 | 15 | } 16 | public void find_gcd(int num1, int num2) 17 | { 18 | int gcd =0 , div=2, small; 19 | small = num10) 21 | { 22 | sum += num%10; 23 | num/=10; 24 | } 25 | return sum; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Power.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajitha-vijayakumar/JAVA/c9873a2a28e911f75d398c22a7f0e0eb9070bb50/Power.class -------------------------------------------------------------------------------- /Power.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | class Power{ 3 | public static void main(String [] args) 4 | { 5 | Scanner sc = new Scanner(System.in); 6 | System.out.println("Enter the base value : "); 7 | int base = sc.nextInt(); 8 | System.out.println("Enter the power value : "); 9 | int power = sc.nextInt(); 10 | Power call = new Power(); 11 | call.find_power(base,power); 12 | } 13 | void find_power(int base,int power) 14 | { 15 | int val = 1; 16 | while(power>0) 17 | { 18 | val = val*base; 19 | power--; 20 | } 21 | System.out.println("The value is : "+val); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Print.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajitha-vijayakumar/JAVA/c9873a2a28e911f75d398c22a7f0e0eb9070bb50/Print.class -------------------------------------------------------------------------------- /Print.java: -------------------------------------------------------------------------------- 1 | //1.PRINT 5! 4! 3! 2! 1! 2 | //2.PRINT 1*10 2*9 3*8 4*7 3 | class Print{ 4 | public static void main(String [] args) 5 | { 6 | Print call = new Print(); 7 | call.print_fact(); 8 | } 9 | void print_fact(){ 10 | int num = 5; 11 | while(num>0) 12 | { 13 | System.out.print(find_fact(num) + " "); 14 | num = num - 1; 15 | } 16 | } 17 | int find_fact(int num){ 18 | int fact = 1; 19 | while (num>0) 20 | { 21 | fact = fact * num; 22 | num--; 23 | } 24 | return fact; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Reverse.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajitha-vijayakumar/JAVA/c9873a2a28e911f75d398c22a7f0e0eb9070bb50/Reverse.class -------------------------------------------------------------------------------- /Reverse.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | class Reverse{ 3 | public static void main(String [] args){ 4 | Scanner sc = new Scanner(System.in); 5 | int val = sc.nextInt(); 6 | Reverse call = new Reverse(); 7 | //call.count_digits(val); 8 | //call.print_reverse(val); 9 | //call.find_reverse(val); 10 | //call.find_sumofdigits(val); 11 | call.check_palindrome(val); 12 | 13 | } 14 | void print_reverse(int num) 15 | { 16 | System.out.println("Just printing the reverse of given number"); 17 | while(num>0) 18 | { 19 | System.out.print(num%10); 20 | num=num/10; 21 | } 22 | } 23 | void count_digits(int num) 24 | { 25 | int count =0; 26 | System.out.println("The number of digits in given Value"); 27 | while(num>0) 28 | { 29 | count++; 30 | num=num/10; 31 | } 32 | System.out.println(count); 33 | } 34 | void find_reverse(int num) 35 | { 36 | int reverse=0; 37 | int rem=0; 38 | System.out.println(" "); 39 | System.out.println("The reverse of given number is founded as : "); 40 | while(num>0) 41 | { 42 | rem=num%10; 43 | reverse= (reverse*10)+rem; 44 | num=num/10; 45 | } 46 | System.out.println(reverse); 47 | } 48 | void find_sumofdigits(int num) 49 | { 50 | int sum=0; 51 | while(num>0) 52 | { 53 | sum += num%10; 54 | num/=10; 55 | } 56 | System.out.println("Sum of Digits: " + sum); 57 | } 58 | void check_palindrome(int num) 59 | { 60 | int given = num; 61 | int reverse=0; 62 | int rem=0; 63 | while(num>0) 64 | { 65 | rem=num%10; 66 | reverse= (reverse*10)+rem; 67 | num=num/10; 68 | } 69 | System.out.println("ARGUMENT "+num); 70 | System.out.println("GIVEN " +given); 71 | System.out.println("REVERSE " +reverse); 72 | if(reverse==given) 73 | { 74 | System.out.println("The given number is palindrome"); 75 | }else 76 | { 77 | System.out.println("The given number is not a palindrome"); 78 | } 79 | } 80 | 81 | } 82 | -------------------------------------------------------------------------------- /School.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajitha-vijayakumar/JAVA/c9873a2a28e911f75d398c22a7f0e0eb9070bb50/School.class -------------------------------------------------------------------------------- /School.java: -------------------------------------------------------------------------------- 1 | public class School{ 2 | public static void main (String [] args) 3 | { 4 | School schoolObj = new School(); 5 | schoolObj.test(); 6 | } 7 | void test() 8 | { 9 | System.out.println("Annual exam"); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /SpyNumber.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajitha-vijayakumar/JAVA/c9873a2a28e911f75d398c22a7f0e0eb9070bb50/SpyNumber.class -------------------------------------------------------------------------------- /SpyNumber.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | class SpyNumber 3 | { 4 | public static void main(String [] args) 5 | { 6 | Scanner sc = new Scanner(System.in); 7 | System.out.println("ENTER THE NUMBER"); 8 | int num = sc.nextInt(); 9 | SpyNumber call = new SpyNumber(); 10 | int sum = call.find_sum_of_digits(num); 11 | int product = call.find_product_of_digits(num); 12 | if(sum == product) 13 | { 14 | System.out.println("Given number is a spy number"); 15 | } 16 | else 17 | { 18 | System.out.println("Not a spy number"); 19 | }} 20 | int find_sum_of_digits(int num){ 21 | int sum = 0; 22 | while(num>0) 23 | { 24 | sum = sum + (num%10); 25 | num = num/10; 26 | } 27 | return sum; 28 | } 29 | int find_product_of_digits(int num){ 30 | int product = 1; 31 | while(num>0) 32 | { 33 | product = product * (num%10); 34 | num=num/10; 35 | } 36 | return product; 37 | } 38 | } 39 | 40 | -------------------------------------------------------------------------------- /Strong.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajitha-vijayakumar/JAVA/c9873a2a28e911f75d398c22a7f0e0eb9070bb50/Strong.class -------------------------------------------------------------------------------- /Strong.java: -------------------------------------------------------------------------------- 1 | import java.util.*; 2 | class Strong{ 3 | public static void main(String [] args) 4 | { 5 | Scanner sc = new Scanner(System.in); 6 | int num = sc.nextInt(); 7 | Strong call = new Strong(); 8 | call.find_strong(num); 9 | } 10 | void find_strong(int num){ 11 | int given = num; 12 | int sum = 0; 13 | int rem = 0; 14 | while(num>0) 15 | { 16 | rem = num%10; 17 | sum = sum + find_factorial(rem); 18 | num = num/10; 19 | } 20 | if(given == sum) 21 | { 22 | System.out.println("Strong number"); 23 | } 24 | else 25 | { 26 | System.out.println("Not a strong number"); 27 | } 28 | } 29 | int find_factorial(int num) 30 | { 31 | int fact = 1; 32 | while(num>0){ 33 | fact = fact*num; 34 | num= num-1; 35 | } 36 | return fact; 37 | } 38 | } 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /Temple.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajitha-vijayakumar/JAVA/c9873a2a28e911f75d398c22a7f0e0eb9070bb50/Temple.class -------------------------------------------------------------------------------- /Temple.java: -------------------------------------------------------------------------------- 1 | class Temple{ 2 | public static void main (String [] args){ 3 | Temple story = new Temple(); 4 | story.find_flowers(7); 5 | } 6 | void find_flowers(int temples) 7 | { 8 | int flowers = 1; 9 | int j=7; 10 | while(temples>0) 11 | { 12 | temples = temples-1; 13 | flowers = flowers*2; 14 | System.out.println("NO. OF FLOWERS WHILE ENTERING TEMPLE "+j+" : "+flowers); 15 | j--; 16 | } 17 | System.out.println("TOTAL NO. OF FLOWERS AT INITIAL STAGE: "+ flowers); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Tenali.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajitha-vijayakumar/JAVA/c9873a2a28e911f75d398c22a7f0e0eb9070bb50/Tenali.class -------------------------------------------------------------------------------- /Tenali.java: -------------------------------------------------------------------------------- 1 | class Tenali{ 2 | public static void main (String [] args){ 3 | Tenali story = new Tenali(); 4 | //story.find_security(1024); 5 | //story.find_flowers(7); 6 | story.print_1(); 7 | } 8 | void find_security(int beats) 9 | { 10 | int security = 0; 11 | int i=1; 12 | while(beats>1) 13 | { 14 | beats = beats/2; 15 | if(beats>=1) 16 | { 17 | System.out.println("SECURITY "+i + " GETS " + beats + " BEATS"); 18 | } 19 | security = security+1; 20 | i++; 21 | } 22 | System.out.println("NO.OF SECURITIES : "+security); 23 | } 24 | void find_flowers(int temples) 25 | { 26 | int flowers = 1; 27 | int j=7; 28 | while(temples>0) 29 | { 30 | temples = temples-1; 31 | flowers = flowers*2; 32 | System.out.println("NO. OF FLOWERS WHILE ENTERING TEMPLE "+j+" : "+flowers); 33 | j--; 34 | } 35 | System.out.println("TOTAL NO. OF FLOWERS AT INITIAL STAGE: "+ flowers); 36 | } 37 | void print_1() 38 | { 39 | 40 | int i=0; 41 | while(i<500) 42 | { 43 | System.out.print(1+" "); 44 | i=i+1; 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Theatre.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajitha-vijayakumar/JAVA/c9873a2a28e911f75d398c22a7f0e0eb9070bb50/Theatre.class -------------------------------------------------------------------------------- /Theatre.java: -------------------------------------------------------------------------------- 1 | class Theatre{ 2 | public static void main(String [] args) 3 | { 4 | Theatre rohini_theatre = new Theatre(); 5 | rohini_theatre.show(120,4); 6 | } 7 | void show(int a,int b) 8 | { 9 | int ticket_price = a; 10 | int no_of_persons = b; 11 | System.out.println(ticket_price*no_of_persons); 12 | } 13 | } 14 | 15 | -------------------------------------------------------------------------------- /casestudy 1.odt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajitha-vijayakumar/JAVA/c9873a2a28e911f75d398c22a7f0e0eb9070bb50/casestudy 1.odt -------------------------------------------------------------------------------- /casestudy2.odt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajitha-vijayakumar/JAVA/c9873a2a28e911f75d398c22a7f0e0eb9070bb50/casestudy2.odt -------------------------------------------------------------------------------- /java course syllabus.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajitha-vijayakumar/JAVA/c9873a2a28e911f75d398c22a7f0e0eb9070bb50/java course syllabus.pdf -------------------------------------------------------------------------------- /java example programs.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajitha-vijayakumar/JAVA/c9873a2a28e911f75d398c22a7f0e0eb9070bb50/java example programs.pdf -------------------------------------------------------------------------------- /sample4.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajitha-vijayakumar/JAVA/c9873a2a28e911f75d398c22a7f0e0eb9070bb50/sample4.txt -------------------------------------------------------------------------------- /sample5.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajitha-vijayakumar/JAVA/c9873a2a28e911f75d398c22a7f0e0eb9070bb50/sample5.txt -------------------------------------------------------------------------------- /sample6.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajitha-vijayakumar/JAVA/c9873a2a28e911f75d398c22a7f0e0eb9070bb50/sample6.txt -------------------------------------------------------------------------------- /sample7.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajitha-vijayakumar/JAVA/c9873a2a28e911f75d398c22a7f0e0eb9070bb50/sample7.txt -------------------------------------------------------------------------------- /sample8.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajitha-vijayakumar/JAVA/c9873a2a28e911f75d398c22a7f0e0eb9070bb50/sample8.txt -------------------------------------------------------------------------------- /sample9.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ajitha-vijayakumar/JAVA/c9873a2a28e911f75d398c22a7f0e0eb9070bb50/sample9.txt --------------------------------------------------------------------------------