0% found this document useful (0 votes)
2 views5 pages

ISC Class12 Computer Project-1

This document outlines a Computer Science project for ISC Class XII, focusing on Java programming concepts such as strings, arrays, and functions. It includes programs for various tasks like Caesar Cipher, removing multiple spaces, identifying Smith numbers, checking for bouncy numbers, and calculating frequency of elements in an array. The project emphasizes the application of problem-solving techniques and logical thinking, along with proper documentation.

Uploaded by

victorbot68
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views5 pages

ISC Class12 Computer Project-1

This document outlines a Computer Science project for ISC Class XII, focusing on Java programming concepts such as strings, arrays, and functions. It includes programs for various tasks like Caesar Cipher, removing multiple spaces, identifying Smith numbers, checking for bouncy numbers, and calculating frequency of elements in an array. The project emphasizes the application of problem-solving techniques and logical thinking, along with proper documentation.

Uploaded by

victorbot68
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

ISC Class XII Computer Science Project

Name: ____________________
Class: XII
School: ____________________
Session: 2026-27

Acknowledgement
I express my sincere gratitude to my Computer Science teacher and my school for providing
guidance and support during the preparation of this project. I also thank my parents and
friends for their encouragement and assistance. This project helped me improve my
understanding of Java programming, problem-solving techniques, and logical thinking.

Preface
This project has been prepared as part of the ISC Class XII Computer Science curriculum.
The objective of this project is to apply programming concepts such as strings, arrays, loops,
conditional statements, functions, and number theory in Java. Each program has been
written according to the requirements provided and includes proper logic and
documentation.

Question 1

Question 2

Question 3

Question 4

Question 5

Program for Question 1


// Caesar Cipher (ROT13)
import [Link].*;
class CaesarCipher
{
public static void main(String args[])
{
Scanner sc=new Scanner([Link]);
[Link]("Enter text: ");
String s=[Link]();

if([Link]()<=3 || [Link]()>=100)
{
[Link]("Invalid Length");
return;
}

String cipher="";
for(int i=0;i<[Link]();i++)
{
char ch=[Link](i);

if(ch>='A' && ch<='Z')


cipher+=(char)((ch-'A'+13)%26+'A');
else if(ch>='a' && ch<='z')
cipher+=(char)((ch-'a'+13)%26+'a');
else
cipher+=ch;
}

[Link]("Cipher Text: "+cipher);


}
}

Program for Question 2


// Remove Multiple Spaces
import [Link].*;
class RemoveSpaces
{
public static void main(String args[])
{
Scanner sc=new Scanner([Link]);
[Link]("Enter sentence: ");
String s=[Link]();

while([Link](" ")!=-1)
s=[Link](" "," ");
[Link]("Result: "+s);
}
}

Program for Question 3


// Smith Number
import [Link].*;
class SmithNumber
{
static int digitSum(int n)
{
int s=0;
while(n>0)
{
s+=n%10;
n/=10;
}
return s;
}

public static void main(String args[])


{
Scanner sc=new Scanner([Link]);
int n=[Link]();
int temp=n;

int sumDigits=digitSum(n);
int sumFactors=0;

for(int i=2;i<=temp;i++)
{
while(temp%i==0)
{
sumFactors+=digitSum(i);
temp/=i;
}
}

if(sumDigits==sumFactors)
[Link]("Smith Number");
else
[Link]("Not a Smith Number");
}
}
Program for Question 4
// Bouncy Number
import [Link].*;
class BouncyNumber
{
public static void main(String args[])
{
Scanner sc=new Scanner([Link]);
int n=[Link]();

if(n<100)
{
[Link]("Not a Bouncy Number");
return;
}

boolean inc=false, dec=false;

while(n>=10)
{
int d1=n%10;
int d2=(n/10)%10;

if(d1>d2) inc=true;
if(d1<d2) dec=true;

n/=10;
}

if(inc && dec)


[Link]("Bouncy Number");
else
[Link]("Not a Bouncy Number");
}
}

Program for Question 5


// Frequency of Elements using Array
import [Link].*;
class FrequencyArray
{
public static void main(String args[])
{
Scanner sc=new Scanner([Link]);
[Link]("Enter n: ");
int n=[Link]();

int a[]=new int[n];


boolean visited[]=new boolean[n];

for(int i=0;i<n;i++)
a[i]=[Link]();

[Link]("Number\tFrequency");

for(int i=0;i<n;i++)
{
if(visited[i]) continue;

int count=1;
for(int j=i+1;j<n;j++)
{
if(a[i]==a[j])
{
count++;
visited[j]=true;
}
}
[Link](a[i]+"\t"+count);
}
}
}

You might also like