CAP310 Modern Programming Tools & Techniques I: Homework 3
CAP310 Modern Programming Tools & Techniques I: Homework 3
Student’s
Signature:
surend
ra
Evaluator’s comments:
_____________________________________________________________
________
1 Write a program that inputs a sentence at runtime. And prints the number of
occurrences of each vowel in it. Further the program must also print the word by word
reverse of the sentence.
Example: If the input string is “What is True in World”, then the output would be as
follows:
VOWEL COUNT
A 1
E 1
I 2
O 1
U 1
ANSWER:
Reverse of sentence:
sb.reverse();
}
ANS:
for(int i=1;i<=5;i++)
for(int j=1;j<=5;j++)
for(int k=1;k<=5;k++)
System.out.println("Thread C:k="+k);
class Thread1
new A().start();
new B().start();
new C().start();