import COM.odi.util.OSHashSet; import COM.odi.util.OSVector; public class Volume{ // members of Volume Class int volNumber; Journal journal; OSVector numbbers; public Volume(int volNmber,Journal j1){ // constructor volNumber = volNmber; journal = j1; numbbers = new OSVector(); } public void addNumber(Numbber numbber){ // method to add the Numbber to the Volume if(numbbers.contains(numbber)){ System.out.println("Number Already Exists "); System.exit(0); } numbbers.add(numbber); } // method to get the Volume number public int getVolumeNumber(){ return volNumber; } // method to get the count of Numbbers in the volume public int getNumOfNumbers(){ return numbbers.size(); } // method to get the name of the Journal public String getJournalName(){ return journal.getJournalName(); } // method to get the collection of the Numbbers of the volume public OSVector getNumbbers(){ return numbbers; } }