Question: Write a program in Java to store a collection of movie names. There should be no duplicate movies in the collection. The program must be
- Write a program in Java to store a collection of movie names. There should be no duplicate movies in the collection. The program must be able to (20 mark):
- add a movie
- remove a movie
- check if a movie exists
- delete all movies
- print out the number of movies
- print a list of all movie names
use HashSet
- Write a program in java that implements a HashMap to store students (student IDs as the key, and student names as the value). The program must be able to (10 mark):
- add some students, then print all students’ name
- remove all of the students at once
Step by Step Solution
3.31 Rating (160 Votes )
There are 3 Steps involved in it
HashSetExjava import javaio import javautil public class HashSetEx public static Set s1 new HashSet ... View full answer
Get step-by-step solutions from verified subject matter experts
