Programming Resources
For Fun and Learning
Charles Cusack
Computer Science
Hope College
main

Python
C++
JAVA
PHP
SQL

Assignments


zuul-MVC


Item.java

/**
 * Write a description of class Item here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Item
{
    // instance variables - replace the example below with your own
    private int weight;
    private String description;

    /**
     * Constructor for objects of class Item
     */
    public Item(String description,int weight)
    {
        this.weight=weight;
        this.description=description;
    }
    public String getDescription() {
        return description;
    }
    public int getWeight() {
        return weight;
    }
    public String toString() {
        return description;
    }
}