Lab 1

Due Friday, 8/26/2011 - 11:59pm

    1. Sign up for the class mailing list at: https://groups.google.com/a/cs.usfca.edu/group/cs112
    2. Design and implement a class called Song that contains instance data for the title, artist, album and play length. Define the Song constructor to accept and initialize this data. Include setter and getter methods for all instance data. Include a toString method that returns a nicely formatted , multi-line description of the song. Create a driver class called PlayList whose main method instantiates and updates several Song objects.
    3. Write an application that prompts for and reads a positive integer. Then, generate and print a random number in the range 1 to the number entered by the user. If the user entered 10, for example, your program would generate a print a number in the range 1 through 10. Include both 1 and the number entered by the user as possible choices.
    4. Implement an application that prompts the user for three integers - a month, a day, and a year. Convert the month integer to the appropriate month string and output a date of the format Month Day, Year. Example: input - 3 4 2008 output - March 4, 2008

Please submit your work in an SVN directory: https://www.cs.usfca.edu/svn/<username>/cs112/lab1

Submission Instructions