import COM.odi.util.OSHashSet; public class Journal{ // member variables String journalName; OSHashSet volumes; public Journal(String jrnalName){ // constructor journalName = jrnalName; volumes = new OSHashSet(); } // methods for Journal class public void addVolume(Volume volume){ //method to add volume to the journal if(volumes.contains(volume)){ System.out.println("Volume Already Exists "); System.exit(0); } volumes.add(volume); } public int getNumberOfVolumes(){ // method to get the number of volumes in the journal return volumes.size(); } public String getJournalName(){ //method to get the journal Name return journalName; } public OSHashSet getVolumes(){ // method to get collection of volumes return volumes; } }