Program File: All India Senior School Certificate Examination 2015-2016
Program File: All India Senior School Certificate Examination 2015-2016
Examination 2015-2016
Program File
Informatics Practices
Saksham Gupta
Class: XII F
Roll No: 1644687
Submitted To:
Mr. RAVI KUMAR
Computer Department
Certificate
This is hereby to
certify
that
the
original
and
about
the
subject
matter
and
the
satisfactorily
by
his
2010 - 2011.
Teachers Signature
Acknowledgement
It would be my utmost pleasure to express my most
sincere gratitude and own a grave sense of thankfulness
to my Informatics Practices teacher Mr. RAVI KUMAR
SAINI , Sr. computer teacher ,Informatics Practices ,
BIRLA SCHOOL PILANI , for his valuable guidance,
incommensurate indoctrination , support and supervision
all through the building of this program file which has
been responsible for present form of the program file
Program File.
I am also thankful to Mr.Virender and Mr.Vikash without
whose help the successful completion of the project
would not have been possible.
I would also like to thank my parents as they
encouraged me to put forward my project.
Saksh
am Gupta
XII F
Contents
Introduction
o System Requirements
Programs
o Program to find factorial of two numbers.
o Program to find the logarithmic value of one number with
respect to base inputted by the user.
o Program to ask permutations of a whole number and its base
which randomly generated.
o Program to find if a String is palindrome or not.
o Program to ask nth root of a random number.
o Program to ask area of body of random dimensions.
o Program To find the sum of first n odd numbers
o Program of classes to print system date.
o Program of loop to print the output
o Program of loop to print the output
o Program of loop to print the output
o Program of loop to print the output
o Program of loop to print the output
o Program of loop to print the output
o Program of class to print the sum series upto n terms:
o Program of class to print the sum of factorials of first n
numbers:
o Program to check entry through use of password
o Program to design a Calculator
o Program to count from highest to lowest number input by
user
Bibliography
Introduction
System Requirements
Intel Pentium 4 Processor or Better
Windows XP/Vista
Java
Java Runtime
256 MB RAM
CD-Rom
1 GB Hard Disk Free
Application Development IDE USED:
Netbeans IDE 6.5.1
Programs
Program to find factorial of two numbers.
else
Reslbl.setText(" Invalid input number. Enter positive number");
}
import java.util.Random;
GuEBtn.setEnabled(true);
Functions:
public boolean isPalindrome(String s){
StringBuffer reversed = (new StringBuffer(s)).reverse();
return s.equals(reversed.toString());}
public boolean isPalindrome2(String s){
StringBuffer reversed = (new StringBuffer(s)).reverse();
return s.equalsIgnoreCase(reversed.toString());}
if(isPalindrome(str))
str = str+" : IS A PALINDROME! ";
else if(isPalindrome2(str))
str = str+" : IS A PALINDROME IF YOU IGNORE CASE!";
else
str = str+" : IS NOT A PALINDROME!";
OutputLbl.setText(str);}
}
import java.util.Random;
Rootlbl.setText(""+root);
GuessBtn.setEnabled(true);
}
Coding ForGuessBtn:
{ float num = Float.parseFloat(nolbl.getText());
float root = Float.parseFloat(Rootlbl.getText());
float a = 1/root;
float ans = (float)Math.pow(num,a);
float res = Float.parseFloat(Valuetf.getText());
if(ans==res){
ReturnLbl.setText( Your answer is correct.It is indeed "+ans);
}
else ReturnLbl.setText(Your answer is not correct.It is "+ans);
}
import java.util.Random;
Coding:
public class Date_Class{
static public void main(String[] args) {
Date d=new Date();
System.out.println("The Date is" +d);}}
9
9 8
9 8 7
9 8 7 6
Coding:
for (int i =9; i> 5;--i){
for(int j =9;j>=i;--j){
System.out.print(j+ );}
System.out.println();}
term = 1/x;
sum+=term;}
JOptionPane.showMessageDialog(null, "THE SUM IS "+sum);}}
import javax.swing.JOptionPane;
tf2.setText(calcval+"0");
if (txt.equals("dig1")) Field.setText(calcval+"1");
if(txt.equals("dig2")) tf2.setText(calcval+"2");
if (txt.equals("dig3")) tf2.setText(calcval+"3");
if(txt.equals("dig4")) tf2.setText(calcval+"4");
if (txt.equals("dig5")) tf2.setText(calcval+"5");
if(txt.equals("dig6")) tf2.setText(calcval+"6");
if (txt.equals("dig7")) tf2.setText(calcval+"7");
if(txt.equals("dig8")) tf2.setText(calcval+"8");
if(txt.equals("dig9")) tf2.setText(calcval+"9");
if (txt.equals("dig.")) tf2.setText(calcval+".");}
Bibliography
Informatics Practices
Dhanpat Rai & co. Class XII textbook
Informatics Practices
Dhanpat Rai & co. Class XI textbook