CSC 2071 Object-Oriented Programming in Java Assignment 2: Fall 2011
CSC 2071 Object-Oriented Programming in Java Assignment 2: Fall 2011
Fall 2011
Assignment 2
Write complete Java programs to solve the following problems. Programming Assignments: (1) Find out the frequency of each character present in the given input string (2) Find out palindrome of a given string. (3) Search instances of a given String from a Source String. (4) Delete a given String from the source text String. (5) Replace a first available instance of a string with a given text. (6) Replace every instance of a String from a given string. (7) Write a program to read English text to end-of-data, and print a count of word lengths, i.e. the total number of words of length 1 which occurred, the number of length 2, and so on. Type in question 3 as input to test your program. (8) An anagram is a word or a phrase made by transposing the letters of another word or phrase; for example, "parliament" is an anagram of "partial men," and "software" is an anagram of "swear oft." Write a program that figures out whether one string is an anagram of another string. The program should ignore white space and punctuation.