PROBEMS:
The Library class would include data members such as ID, Date of acquisition, description, number of copies, title and instance methods such addItem() and retrieveItem() also accessor and mutator methods are needed to accecss data members.
User arrays to store library holdings.
So here's my questions:
What do the instance methods in the problem means and how can make such method?
How can i store library holdings into an array? Can anybody give me an easiest example?
So far here's my code:
public class Library
{
private int id;
private String date_acquisition;
private String description;
private int num_copies;
private String title;
public void addItem()
{
}
public void retrieveItem()
{
}
public void setId(int temp_id)
{
id = temp_id;
}
public int getId()
{
return id;
}
public void setDateAcquisition(String temp_date_acquisition)
{
date_acquisition = temp_date_acquisition;
}
public String getDateAcquisition()
{
return date_acquisition;
}
public void setDescription(String temp_description)
{
description = temp_description;
}
public String getDescription()
{
return description;
}
public void setNumberOfCopies(int temp_num_copies)
{
num_copies = temp_num_copies;
}
public int getNumberOfCopies()
{
return num_copies;
}
public void setTitle(String temp_title)
{
title = temp_title;
}
public String getTtle()
{
return title;
}
}
Thanks in advance ;)