IGNOU - Indira Gandhi National Open University, IGNOU Papers, IGNOU Assignments, IGNOU Results, University, Books, MBA, MCA, Exams, Delhi, India, Course, BCA, Bsc, Msc
 
Google
 
Home IGNOU Papers IGNOU Assignments IGNOU Students Forum IGNOU Articles Indian Education     Registration Login
Indira Gandhi National Open University IGNOU Indira Gandhi National Open University
IGNOU Latest Assignments
IGNOU BCA Assignments BCA 2009
IGNOU BCA Assignments BCA 2008
IGNOU BCA Assignments BCA 2007
IGNOU BCA Assignments BCA 2006
IGNOU Latest Assignments
IGNOU BCA Assignments IGNOU BCA Assignments
IGNOU BCA Assignments IGNOU MCA Assignments
IGNOU MBA Assignmants IGNOU MBA Assignments

IGNOU > IGNOU Assignments > BCA > BCA 2007 Assignments >Introduction to Internet Programming

IGNOU BCA Assignments

Question 1: (a) Write a Java program that enters a 10 digits string as a typical STD telephone number extract the first 3 digits as area code, the 3 digit exchange and the remaining 4 digit numbers as separate strings and print them.

Ans:

Class xyz
{
public static void main (strings args[ ])
{
Int n;
Int Si = new Int [10]
BufferRead br = new Buffer reader new Input stream Reader (System in);
System out print/n (“Enter the phone no”)
S1 = br readline ();
}
}


(b). Implement the Fibonacci series in Java. Your program should invoke both the iterative and the recursive implementation.

Ans:

class factorial
{
int fact (intn)
{
int result;
If (n ==1);
Return;
Else
Result = fact (n-1) * n;
return result;
}
}
class number
{
public static void main
(string args [ ] )
{
intn;
factorial f = new factorial ();
n = f fact (J);
system out print/n (“factorial of 7 is” + n);
}
}


(c). Write a program to find out the minimum and maximum elements of an array.

Ans:

class xyz
{
public static void main (string args[ ])
{
int n,
string s1 = new string [50]
Buffer Read br = new
Input stream reader
(system/n)
System out print/n (“Enter first string”)
S1 = br readline ( );
System out print/n (“Enter second string”)
S2 = br readline ();
n = S1 index of (s2)
If (n == -1)
System out print/n (“String not found”);
Else
System out print/n (“String found at “tnt” position);
}
}

PREVIOUSINDEXNEXT

Indira Gandhi National Open University   Indira Gandhi National Open University

HOME  |   ABOUT US  |  GUEST BOOK | TERMS OF SERVICE | PRIVACY POLICY | CONTACT US

© 2003-2012, IGNOUGuess.com

Website Designing, Website Development, Search Engine Promotion, Web Hosting By: DreamzSop Advertising Private Limited.