Strings Function-Advanced Computer Programminng-Assignment, Exercises of Advanced Computer Programming

This assignnment was given by Babita Kalirai at Dhirubhai Ambani Institute of Information and Communication Technology for Advanced Computer Programming course. It includes: Factorial, User, Palindrome, Sequence, Matrix, , Multiplication, Array, Strings, Java

Typology: Exercises

2011/2012

Uploaded on 07/13/2012

ekanath
ekanath 🇮🇳

3.8

(4)

76 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Assignment: 01
ADVANCE COMPUTER PROGRAMMING
Due date: 30-09-2011
Q1: calculate factorial till the number provided by the user.
Q2: A palindrome is a sequence of characters that reads the same backward as is
read forward. For example madam, 11511. Write a programme that takes a 5-
digit number and determines if it is a palindrome or not.
Q3: Perform matrix multiplication.
Q4: Take an array of Strings and try string functions available in String class in
java. (java.lang.String)
Example:
Replace First function:
public class StringReplaceFirst {
public static void main(String[] args) {
String str = "Her name is Tamana and Tamana is a good girl."
;
String strreplace = "Sonia";
String result = str.replaceFirst("Tamana", strrepla);
System.out.println(result);
}
}
docsity.com docsity.com

Partial preview of the text

Download Strings Function-Advanced Computer Programminng-Assignment and more Exercises Advanced Computer Programming in PDF only on Docsity!

Assignment: 01

ADVANCE COMPUTER PROGRAMMING

Due date: 30-09-

Q1: calculate factorial till the number provided by the user.

Q2: A palindrome is a sequence of characters that reads the same backward as is

read forward. For example madam, 11511. Write a programme that takes a 5-

digit number and determines if it is a palindrome or not.

Q3: Perform matrix multiplication.

Q4: Take an array of Strings and try string functions available in String class in

java. (java.lang.String)

Example:

Replace First function:

public class String ReplaceFirst { public static void main(String[] args) { String str = "Her name is Tamana and Tamana is a good girl." ; String strreplace = "Sonia"; String result = str.replaceFirst("Tamana", strrepla); System.out.println(result); } }

docsity.comdocsity.com