CS 1713 Introduction to Computer Science:
Comments on Project 4
This project was graded out of 20 points.
The
TuneList
should only have one field, an
ArrayList
of
Tune
.
The list of songs is not part of the state of the object. It should be created when needed.
If the list of songs were a field, it would need to be updated by the
add
method.
Choose appropriate identifier names.
It is simpler to do the sorts with an array, especially since most of the time you need to make a copy and you know the size in advance.
If you sorted an
ArrayList
rather than an array, be careful to not use
add
.
add
always increases the size of the list.
Use
set
. To interchange:
temp = x.get(i); x.set(i,x.get(j)); x.set(j,temp);