# Help For School Project!

• 10-15-2013, 02:05 PM
appy
Help For School Project!
I Don't Know If I'm Posting This At The Rite Place Or Not!!

I've Been Given HomeWork From The School To Do A Java Project And I Have To Create Data Description For The Programs.

The Following Fields Should Be There,
Integer | Type | Scope | Purpose.

As Example Given From The Teacher,
Integer | Type | Scope | Purpose.
i | int | main() | Controls For Loop.

I Have To Do It For The Following Two Programs:-
PalindRome
Integer To Octal And Binary

Programs :
Integer To Binary And Decimal

Code:

```import java.io.*; class decbin { public static void main() { int i; int o=0,n=0; DataInputStream obj=new DataInputStream(System.in); try { System.out.println("Enter The Value Of n ="); n=Integer.parseInt(obj.readLine()); } catch (IOException e) { } System.out.println("Binary Answer Is:" + (Integer.toBinaryString(n))); System.out.println("Octal Answer Is:" + (Integer.toOctalString(n))); } }```
PalindROme
Code:

```import java.io.*; class PalindRome { public static void main()throws IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter Any Integer"); int n=Integer.parseInt(br.readLine()); int digit=0,copy=n,rev=0; while(n!=0) { digit = n%10; rev=(rev*10)+digit; n=n/10; } if (rev==copy) { System.out.println("PalindRome"); } else { System.out.println("Not PalindRome"); } } }```
• 10-15-2013, 02:08 PM
appy
Re: Help For School Project!
Attachment 5644 Also A Visual Example For Armstrong Number.

Program :
Code:

```import java.util.*; class arm extends Pattern2 { public static void main(String ar[]) { System.out.println("Enter Any No."); Scanner sc=new Scanner(System.in); int a=sc.nextInt(); int c=a,d=0,s=0; while(c>0) { d=c%10; s=(d*d*d)+s; c=c/10; } if(s==a) { System.out.println("ArmStrong"); } else { System.out.println("Not ArmStrong"); } } }```
• 10-15-2013, 03:01 PM
PhHein
Re: Help For School Project!
Do you have any questions?
• 10-15-2013, 03:48 PM
appy
Re: Help For School Project!
Yeah How To Create The Data Description For The Two Programs!!
• 10-15-2013, 03:55 PM
Tolls
Re: Help For School Project!
Surely you can start?
And then if you hit a problem ask a question.
Because this is not the place to get someone to do your homework for you.
• 10-15-2013, 07:54 PM
appy
Re: Help For School Project!
T_T I'm Not Asking To Do My ProJect!!
I've Completed Every Thing And Just Not Able To Create The Data Description!! Was Just Asking How To Do!! What To Enter In Purpose T_T
• 10-16-2013, 10:59 AM
Tolls
Re: Help For School Project!
But you've been given a table showing what you need to find in your code.
You should (at the least) be able to populate the first couple of columns.
• 10-16-2013, 12:07 PM
appy
Re: Help For School Project!
i cant get what to type in purpose bro :(
• 10-16-2013, 12:37 PM
SurfMan
Re: Help For School Project!
As far as I can tell, the column "purpose" is just the description the teachers gave to the fields you are supposed to introduce.