BIRLA
INSTITUTE OF TECHNOLOGY & SCIENCE, PILANI
SOFTWARE DEVELOPMENT & EDUCATIONAL TECHNOLOGY UNIT
SDET C102, CORE JAVA
LAB-6 : 2/11/07
1. Design a Queue<T> class using ArrayList<T> class. You should implement the following methods: add() and remove(). Write another class called QueueDemo and invoke the methods implemented.
2. Read a text file called dict.txt that contains lines of the form :
Word1 meaning1
Word2 meaning2 … and so on
Populates these entries in to a HashMap. Take a argument in your program and print the meaning of the word.
java LookUp apple
red fruit
java LookUp glucose
word not found!!!
3. Write a class FileCopier that takes path of source file and copies it at the destination location mentioned.
java FileCopier srcFile dstnFile
100 bytes
copied