package edu.ucsb.cs56.w14.lab05.sdrhoads;

/** 
	Class Album represents a Full-length Vinyl Record. An Album has a name of type String, albumName, and a unique album identification number, albumID.<br> Note: albumID is type String because it mimics a serial-style number where leading zeros may be significant.  
    @author P. Conrad
    @author Tom Craig, Sidney Rhoads
    @version UCSB, CS56, W14
*/
public class Album
{
    private String albumID; // Unique ID number for the album: e.g. 123456789
    // note: String because leading zeros may be significant

    private String albumName; // name of the Album, e.g "Boston"

    /**
       Two-arg constructor
       @param id  ID number for the album: e.g. 123456789
       @param name name of the Album, e.g "Boston"
    */

    public Album(String id, String name)
    {
      albumID = id; 
      albumName = name;
    }

    /**
	Getter for albumID
	@return albumID, ID number for the album: e.g. 123456789
    */

    public String getAlbumID ()
    { 
    	return albumID;
    }

    /**
	Getter for albumName
	@return name of the Album, e.g "Boston"
    */
    public String getAlbumName () 
    {
    	return albumName; 
    }

    /**
       convert to String representation in format [albumID,ablumName]
       e.g. <code>["123456789","Boston"]</code>

       @return formatted string, [albumID,albumName]
    */

    @Override
    public String toString() 
    {
    	String result = "[" + albumID + "," + albumName + "]";
		return result;
    }


    /** hashcode to be used for hash tables, etc.
	based only on the albumID value
	@return hashCode of the albumID
     */

    @Override
    public int hashCode() 
    {
        return this.getAlbumID().hashCode(); 
    }

    /** compare for equality based on albumID
	@return true if parameter is a Album with same albumID, otherwise false
     */

    @Override
    public boolean equals(Object o) 
    {	//boiler plate
    	if(o == null)
    	{
	    	return false;
    	}
    	if(this == o)
    	{
	    	return true;
    	}
    	if(!(o instanceof Album))
    	{
	    	return false;
    	}
    	Album a = (Album) o;
    	
    	if(this.getAlbumID() == a.getAlbumID())
    	{
	    	return true;
    	}
        return false;
    }
    /** instantiates and then prints an Album a
	@return void
     */
    public static void main(String [] args)
    {
    	Album a = new Album("12345", "Boston");
    	
    	System.out.println(a);
    }

}
@@ -46,14 +46,11 @@
 * %0A%09
-Class 
+%3Cp%3E
 Albu
@@ -114,89 +114,253 @@
 ame 
-of type String, albumName, and a
+and a unique album identification number%3C/p%3E%0A%09%0A%09%3Cp%3EalbumName corresponds to the album's name; for example, %22Boston.%22 The albumName does not have to be
  unique
+.
  album
- identification number, albumID.%3Cbr%3E
+ID corresponds to the album's unique identification number; for example, %2201234.%22
  Not
@@ -464,18 +464,22 @@
 ificant.
-  
+%3C/p%3E%0A%09
 %0A    @au
@@ -643,32 +643,33 @@
 the album: e.g. 
+%22
 123456789%0A    //
@@ -657,24 +657,25 @@
 . %22123456789
+%22
 %0A    // note
@@ -866,32 +866,33 @@
 the album: e.g. 
+%22
 123456789%0A      
@@ -880,24 +880,25 @@
 . %22123456789
+%22
 %0A       @par
@@ -1120,16 +1120,17 @@
 m: e.g. 
+%22
 12345678
@@ -1130,16 +1130,17 @@
 23456789
+%22
 %0A    */%0A

Comment Update due to Conrad's email