Java 學習記錄46 — LinkedList Challenge

Create a program that implements a playlist for songs

Create a Song class having Title and Duration for a song.

The program will have an Album class containing a list of songs.

The albums will be stored in an ArrayList

Songs from different albums can be added to the playlist and will appear in the list in the order they are added.

Once the songs have been added to the playlist, create a menu of options to:-

Quit,Skip forward to the next song, skip backwards to a previous song. Replay the current song.

List the songs in the playlist

A song must exist in an album before it can be added to the playlist (so you can only play songs that you own).

Hint: To replay a song, consider what happened when we went back and forth from a city before we started tracking the direction we were going.

As an optional extra, provide an option to remove the current song from the playlist

hint: listiterator.remove()

Song.java

Album.java

PlayList.java

PlayListMain.java

一樣是看完題目,自己先寫,沒有看答案

應該跟 Tim 要求的有些出入

畢竟他題目的指示,越後面的課程越來越難懂

檢查 song 有沒有進入 album 這也沒教阿 不曉得怎處理

Tim Version:

Song_TimVersion

Album_TimVersion

MainSong_TimVersion

記錄成為軟體工程師的過程