|
CSE 1030 - Assignment #4 - The Symphony Class - a Collection of Musicians
SC/CSE 1030 - Fall 2012 - Assignment #4
The Symphony Class - a Collection of Musicians
Although the Musician class is already a useful tool for the Kapellmeister of the
York Symphony Orchestra, it lacks a way to organise musicians into multiple
groups. This hasn't been a problem up to now, but the Kapellmeister has been
bragging to the management of the other local orchestras about your
Musician software.
So now, a way to organise groups of musicians into multiple symphonies is
needed.
Your goal for this assignment is to create a new Symphony
Java Class matching the
Symphony API.
To complete this assignment, you must do these things:
Implement the Symphony class, matching the details given in
the Symphony API.
You are responsible for defining and managing the data
members of the Symphony class that you will need, and
for implementing the functions described in the API.
Include appropriate comments and Javadoc comments in your source code.
Submit your Symphony class electronically before the deadline
using the submit command:
submit 1030 a4 Symphony.java
Some notes:
You will need an implementation of the Musician class to complete this assignment.
You may use either your solution to Assignment #3, or the prof's solution:
Musician.java. The
API for the Musician class
is available here.
Note that you should not need to change the Musician class to complete this assignment.
Also, if you did not get a perfect mark for Assignment #3, then you should probably
use the Prof's solution - otherwise you could lose marks on this assignment for mistakes
in your code from the previous assignment.
You will find the following class useful:
SymphonySection.java
We have also provided the
API for the SymphonySection class.
(Note, you should not change the SymphonySection class to complete this assignment.)
A Java program that provides a simple command-line interface
for testing your Symphony implementation, is available here:
a4.java.
This program includes several tests to help you test your code.
Your source code should be well organised and documented.
Remember the Course's, Department's, and the University's
policies on academic honesty - do your own assignment yourself.
(Besides, doing it yourself is the only way to learn!)
This assignment is due on Friday October 5, at noon. Late
assignments will not be accepted.
Start Early - Don't leave your assignment to the last minute!
Remember that you can use the submit command more
than once - if you submit your Symphony.java file again, it will
replace the previous submission.
So if you
make a mistake, don't panic, just fix it, and resubmit it
(before the deadline).
Additional information regarding the submit command can be
found by typing man submit at the command line.
Do not use the Type package, nor its earlier
incarnation, the york package.
Your programs must compile and run on the Prism computers.
Your grade will be a number from 0 to 10. The breakdown is:
1 mark for properly implementing the necessary private data members.
1 mark for implementing the Symphony.add() function so that
it can add musicians to a symphony object.
1 mark for ensuring that Symphony.add() does not allow
duplicate musicians to be added to a symphony.
1 mark for implementing a copy constructor for the Symphony
class that performs a "deep" copy.
1 mark for implementing the Symphony.find() function.
1 mark for implementing the Symphony.remove() function.
1 mark for implementing the Symphony.getIterator() function.
1 mark for implementing the static public void main(Strings[] args)
function including some testing of your code.
2 marks for coding style (nicely organised code with comments).
Have FUN!
|
|