Computer File
Computer File
PROJECT FILE
[COMPUTER APPLICATIONS]
(SESSION : 2023-2024)
(In the fulfillment of Board Examinations)
INDEX
Acknowledgement
CERTIFICATE
This is to certify that Aadya Chaudhary of class X-A has completed the project
of Computer Applications under my guidance. This is entirely her own work.
ACKNOWLEDGEMENT
A special word of appreciation for my friend, for helping me in one way or the
other.
Student’s Name
Aarna Parashar
Solution:
import java.util.*;
class q1
int rollno,physics,chem,math;
String name,email;
s1.rollno=sc.nextInt();
System.out.print("Name : ");
s1.name=sc.next();
System.out.print("Email : ");
s1.email=sc.next();
System.out.print("Physics : ");
s1.physics=sc.nextInt();
System.out.print("Chemistry : ");
s1.chem=sc.nextInt();
System.out.print("Math : ");
s1.math=sc.nextInt();
Name: Aarna Parashar
Class & Section: 11th – A
Class Roll Number : 01
Sacred Heart Convent Higher Secondary SchoolProject File : Computer Applications
int total=s1.physics+s1.chem+s1.math;
int avg=(total*100)/300;
String grade;
if(avg<33)
grade="Fail";
grade="III";
grade="II";
grade="I";
else
grade="Distinction";
//Report card..
System.out.println("\n***Report Card***");
System.out.println("Name : "+s1.name);
System.out.println("Email : "+s1.email);
System.out.println("Physics : "+s1.physics);
System.out.println("Chemistry: "+s1.chem);
System.out.println("Math : "+s1.math);
System.out.println("Total : "+total);
System.out.println("Average : "+avg);
System.out.println("Grade : "+grade);
Solution:
public class q2 {
// number)
// number)
// sum
// string
return result;
System.out.print(add_Binary(x, y));
Solution:
System.out.println(i);
if (num <= 1) {
return false;
if (num % i == 0) {
return false;
return true;
int reversedNum = 0;
while(temp != 0) {
temp /= 10;
Solution:
int sum = 0;
sum += array[i];
Ques. 5: Write a java program to search the desired elements with its
location
Solution :
import java.util.Scanner;
array[i] = scanner.nextInt();
if (array[i] == searchElement) {
Name: Aarna Parashar
Class & Section: 11th – A
Class Roll Number : 01
Sacred Heart Convent Higher Secondary SchoolProject File : Computer Applications
location = i;
break;
if (location != -1) {
} else {
Solution:
import java.util.Arrays;
rearrangeAscending(values);
int n = arr.length;
boolean swapped;
swapped = false;
arr[j + 1] = temp;
swapped = true;
// If no two elements were swapped in the inner loop, then the array is
already sorted
if (!swapped) {
break;
Solution:
import java.util.Scanner;
int sum = 0;
number /= 10;
return sum;
int count = 0;
int i = 1;
if (sumOfDigits(i) == 7) {
count++;
i++;
return i - 1;
int n = scanner.nextInt();
}
Name: Aarna Parashar
Class & Section: 11th – A
Class Roll Number : 01
Sacred Heart Convent Higher Secondary SchoolProject File : Computer Applications
Solution:
if (n <= 1) {
return false;
if (n % i == 0) {
return false;
return true;
int limit = 100; // Change this value to check for twin primes up to a
different limit
System.out.println("Twin Primes:");
Solution:
Name: Aarna Parashar
Class & Section: 11th – A
Class Roll Number : 01
Sacred Heart Convent Higher Secondary SchoolProject File : Computer Applications
import java.util.Scanner;
System.out.println(timeInWords);
sc.close();
if (minute == 0) {
if (minute == 1) {
} else {
String[] words = {
};
return words[number];
} else {
return "";
}
Name: Aarna Parashar
Class & Section: 11th – A
Class Roll Number : 01
Sacred Heart Convent Higher Secondary SchoolProject File : Computer Applications
Solution:
Name: Aarna Parashar
Class & Section: 11th – A
Class Roll Number : 01
Sacred Heart Convent Higher Secondary SchoolProject File : Computer Applications
import java.util.ArrayList;
import java.util.List;
System.out.println(anagram);
generateAnagram(word.toCharArray(), 0, anagrams);
return anagrams;
if (index == chars.length - 1) {
anagrams.add(String.valueOf(chars));
return;
chars[i] = chars[j];
chars[j] = temp;
Solution:
Name: Aarna Parashar
Class & Section: 11th – A
Class Roll Number : 01
Sacred Heart Convent Higher Secondary SchoolProject File : Computer Applications
import java.util.Scanner;
return sequence;
return sequence;
sequence[0] = 0;
sequence[1] = 1;
}
Name: Aarna Parashar
Class & Section: 11th – A
Class Roll Number : 01
Sacred Heart Convent Higher Secondary SchoolProject File : Computer Applications
return sequence;
if (choice == 1) {
System.out.println("Generated sequence:");
else if (choice == 2)
Name: Aarna Parashar
Class & Section: 11th – A
Class Roll Number : 01
Sacred Heart Convent Higher Secondary SchoolProject File : Computer Applications
System.out.println("Generated sequence:");
} else if (choice == 3) {
System.out.println("Generated sequence:");
} else {
scanner.close();
Name: Aarna Parashar
Class & Section: 11th – A
Class Roll Number : 01
Sacred Heart Convent Higher Secondary SchoolProject File : Computer Applications
Solution:
Name: Aarna Parashar
Class & Section: 11th – A
Class Roll Number : 01
Sacred Heart Convent Higher Secondary SchoolProject File : Computer Applications
import java.util.HashSet;
System.out.println(digit);
while (number != 0) {
return uniqueDigits;
Solution:
Name: Aarna Parashar
Class & Section: 11th – A
Class Roll Number : 01
Sacred Heart Convent Higher Secondary SchoolProject File : Computer Applications
import java.util.ArrayList;
import java.util.List;
System.out.println("Smith Numbers:");
if (isSmithNumber(i)) {
int sum = 0;
number /= 10;
Name: Aarna Parashar
Class & Section: 11th – A
Class Roll Number : 01
Sacred Heart Convent Higher Secondary SchoolProject File : Computer Applications
return sum;
// Find all prime factors of the number and store them in the list
while (number % i == 0) {
primeFactors.add(i);
number /= i;
int sum = 0;
sum += getDigitSum(factor);
return sum;
Solution:
Name: Aarna Parashar
Class & Section: 11th – A
Class Roll Number : 01
Sacred Heart Convent Higher Secondary SchoolProject File : Computer Applications
import java.util.ArrayList;
import java.util.List;
if (isKaprekarNumber(i)) {
return true;
return false;
Name: Aarna Parashar
Class & Section: 11th – A
Class Roll Number : 01
Sacred Heart Convent Higher Secondary SchoolProject File : Computer Applications
Solution:
Name: Aarna Parashar
Class & Section: 11th – A
Class Roll Number : 01
Sacred Heart Convent Higher Secondary SchoolProject File : Computer Applications
import java.util.Scanner;
int[] denominations = {2000, 500, 200, 100, 50, 20, 10, 5, 2, 1};
amount %= denominations[i];
System.out.println("Denominations:");
if (count[i] > 0) {