Wednesday, 7 March 2012

Lab 01 -Question 2

Write a program that will read any given text file (filename passed as command line argument)
and print the number of occurrences of each word. Assume that words can be delimited by a
space, a comma, a newline or a full-stop. You are required to use a HashMap to store the word
count.

Lab 01- Question 1

DO question 1 & 2 and submit the work to rimiazizi@gmail.com , before 12.10 noon today.


Performing set operations on hash sets
a) Allow user to enter two set of staff names, one for those who play cricket and one for those
who play tennis.
b) Read and store the names in two HashSet objects.
c) Using these two sets perform the necessary operations to print the following:
i. The names of staff playing both cricket and tennis
ii. The names of staff playing either one or both
iii. The names of staff playing cricket but not tennis
iv. The names of staff playing tennis but not cricket

Welcome to SADI

Welcome to SADI !