package lt.ktu.gmj.tasks;

import java.io.*;
import java.net.*;
import java.util.Random;
import java.util.StringTokenizer;
import lt.ktu.HostNameRetriever;
import lt.ktu.gmj.*;
import lt.ktu.gmj.propertySheet.*;

public class Item
{
	private String	m_name;
	private int		m_amount;
	private float	m_price;
	private float	m_weight;
	
	private double	m_ratio;
	private boolean	m_taken;

	public double ratio()
	{
		return m_ratio;
	}
	
	//setters
	public void taken(boolean value)
	{
		m_taken = value;
	}
		
	public void name(String value)
	{
		m_name = value;
	}
	public void	amount(int value)
	{
		m_amount = value;
	}
	public void price(float value)
	{
		m_price = value;
	}
	public void weight(float value)
	{
		m_weight = value;
	}	
	//getters
	public boolean taken()
	{
		return m_taken;
	}
		
	public String name()
	{
		return m_name;
	}
	public int	amount()
	{
		return m_amount;
	}
	public float price()
	{
		return m_price;
	}
	public float weight()
	{
		return m_weight;
	}
	public Item(float weight, float price, int amount, String name)
	{
		m_name = name;
		m_amount = amount;
		m_price = price;
		m_weight = weight;
		
		m_ratio = price / weight;
	}
}