public class Journal
{
private String titel;
private String publisher;
private Integer volume;
private String year;
private ArrayList<String>circulationList;
/**
* Constructor for objects of class Journal
*/
public Journal(String newTitel, String newPublisher, Integer newVolume, String newYear)
{
titel= newTitel;
publisher= newPublisher;
volume= newVolume;
year= newYear;
circulationList =new ArrayList<String>();
}
public void setTitel(String newTitel)
{
titel= newTitel;
}
public String getTitel()
{
return titel;
}
public void setPublisher(String newPublisher)
{
publisher= newPublisher;
}
public String getPublisher()
{
return publisher;
}
public void setVolume(Integer newVolume)
{
volume= newVolume;
}
public Integer volume()
{
return volume;
}
public void setYear(String newYear)
{
year=newYear;
}
public String getYear()
{
return year;
}
/**
* Exercise 2.
*/
/**
* Method for add employee
*/
public void addEmployee (String empName){
if (circulationList.contains(empName))
{System.out.println("You are already in the system");}
circulationList.add(empName);
}
/**
* Method for print the circulations list
*/
public void printingTheCirulationListOnTheScreen(){
for ( String a : circulationList ){
System.out.println(a);
}
}
/**
* Method for removing an employee
*/
public void removeEmployee(String empName){
circulationList.remove(empName);
}
}