0% found this document useful (0 votes)
79 views

CSC 2071 Object-Oriented Programming in Java Assignment 2: Fall 2011

This document outlines 8 programming assignments for an object-oriented programming course in Java. The assignments involve writing Java programs to: (1) find character frequencies in a string, (2) check for palindromes, (3) search for substrings, (4) delete substrings, (5) replace first substrings, (6) replace all substrings, (7) count word lengths in text, and (8) check for anagrams ignoring whitespace and punctuation.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views

CSC 2071 Object-Oriented Programming in Java Assignment 2: Fall 2011

This document outlines 8 programming assignments for an object-oriented programming course in Java. The assignments involve writing Java programs to: (1) find character frequencies in a string, (2) check for palindromes, (3) search for substrings, (4) delete substrings, (5) replace first substrings, (6) replace all substrings, (7) count word lengths in text, and (8) check for anagrams ignoring whitespace and punctuation.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

CSC 2071 Object-oriented Programming in Java

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.

You might also like