Many many thanks to Dr. Garrison for this project description and starting code. THANK YOU BASED BILLIAM

Imagine that you are starting a streaming radio business. Partnerships have been established to provide you with audio content, and you will stream that content to users. You plan to use your knowledge of what songs your users like/dislike to make effective suggestions for new songs that they will like.

In this assignment, you will be designing an abstract data type (ADT) that stores the service’s music library and users’ ratings of songs. This ADT represents a data structure that will be used by both client applications and for administrative uses (like adding new songs to the library).

Once you complete this ADT, you could provide it to the programmers of the client applications, and they will be able to develop applications based on this specification - like you did in project 1.

You could also distribute the ADT to the engineers in charge of implementing the functionality of the data structure. Then these two groups can work in parallel on their respective components, which can work together since they both follow the “contract” that your ADT provides.

You will not be implementing this data structure.

You do not need to consider implementation-level details, since you are only writing the ADT. This means that you must specify the full set of details that a client needs to know in order to use the data structure, but not the details of how the operations will be carried out or how the data will be organized in memory. The implementation details should be left up to the implementers.


Starting point

Download and extract these materials. Contained are:


Your task

You must write an abstract data type as a Java interface.

We have given you the names of several abstract methods that the data structure would need to support. You must specify them in the Javadoc comments above each method.

You should consider all possible corner cases in your specification, and describe what the class should do in all cases. A client that reads your ADT should know all the things that could go wrong, and how each will be handled.

Error cases should be unambigous to the client, and they should always know which specific error was encountered. For some corner cases, you will need to make a design decision regarding the best way to handle them. You have the freedom to make these decisions any way you wish, as long as you are consistent, thorough, and clear in your descriptions.

Remember that you document parameters by using the @param name command; return values with @return, and exceptions with @throws name.

The methods

There are 8 methods. 1 has been done for you, as an example of the kind of specification we are looking for. So you must do the remaining 7. You will be adding parameters, return types, and exceptions to throw to each. Each one has a short description in StreamingRadio.java, so read those.

Notes


Testing

Well, you’re not writing any code, but you are writing documentation, and your interface should compile with javac. You won’t be able to run it, of course ;)

Use this command to produce the HTML documentation:

javadoc -html5 -d doc *.java

If your documentation parses fine, it will produce a file in doc/ named index.html which you can open to view it.

If you are using a version of Java older than 1.9, upgrade. If you can’t, use this command: javadoc -d doc *.java


Grading Rubric


Submission

You will submit a ZIP file named username_proj4.zip where username is your Pitt username.

Do not put a folder in the zip file, just the following file(s):

Do not submit any IDE project files.

Submit to the Box folder at this link. Drag your zip file into your browser to upload. If you can see your file, you uploaded it correctly!

You can also re-upload if you made a mistake and need to fix it.