you create a Python program which music charts. The use case diagram shows the possible applications.
songs enter
title and artist to be entered.
Voting record
for a specific track to be the number of votes (the voting) entered. The selection of the title could, for example via a search.
Hitlist spend
The list of songs (Title, Artist, voting) in order of votes (more votes first) should be issued.
read songs from file
The list of songs (Title, Artist - without voting) to be read from a file. The file format can be chosen. as rows in the form
title; Artist . store songs in file
The list of songs (Title, Artist - without voting) to be stored in a file. File format as above.
Hitlist save
The Hit List (title, artist and voting) should be stored in a file. The file format can be chosen. as rows in the form
title; Artist; Voting . Hitlist Music
The Hit List (title, Artist and Voting) is to be read from a file. The file format as above.
sample session
$ python charts.py
0 End
1 songs enter
Voting record
2 3 4 Songs
hit list from a file
5 Songs to file
6 hit list from a file
7 Hitlist Save to File
>>> 1
title>>> Peter Gunn
Artist>>> Emerson, Lake & Palmer
0 End
1 songs enter
2 3
Voting record charts
4 Songs from Read file
5 Songs to file
6 7
hit list from file to file charts
>>> 1
title>>> Haitian Fight Song
Artist>>> Charles Mingus
0 End 1 Songs
enter
2 3 Voting record
Hitlist
4 Songs from file to file
5 Songs
6 7
hit list from a file to file charts
>>> 5
filename [songs.txt] >>>
0 End
1 songs enter
Voting record
2 3 4 Songs charts
read from file
5 Songs to file
6 hit list from a file
7
hit list to a file>>> 4
filename [songs.txt]>>>
enter 0 End
1 Songs 2
Voting record
3 Hit List
Rating 4 songs from file to file
5 Songs
six charts from file to file
7 Hitlist
>>> 3
Peter Gunn , Emerson, Lake & Palmer 0
Haitian Fight Song Charles Mingus 0
Gamma Ray Birth Control 0
Spectrum Billy Cobham 0
Take Five Dave Brubek 0
Overnite Sensation Frank Zappa 0
Sing, Sing, Sing Gene Krupa , 0
Bahamut Hazmat Modine 0
Cantaloupe Island Herbie Hankock 0
Blue Train John Coltraine 0
North Carolina Les McCann 0
Pressure Mary Broadcast Band 0
Mile Stones Miles Davis
0 0 End
1 songs enter
2 3 Voting record
Hitlist
4 Songs from file to file
5 Songs
6
hit list from a file save to file charts
7> >> 2
title (or part)>>> Peter
vote for Peter Gunn>>> 23
0 End
1 songs enter
Voting record
2 3 4 Songs charts
read from file
5 Songs to file
6 hit list from a file
7
hit list to a file>>> 3
Peter Gunn Emerson, Lake & Palmer 23
Haitian Fight Song Charles Mingus 0
Gamma Ray Birth Control 0
Spectrum Billy Cobham 0
Take Five Dave Brubek 0
Overnite Sensation Frank Zappa 0
Sing, Sing, Sing Gene Krupa 0
Bahamut Hazmat Modine 0
Cantaloupe Island Herbie Hankock 0
Blue Train John Coltraine 0
North Carolina Les McCann 0
Pressure Mary Broadcast Band 0
Mile Stones Miles Davis
0 0 End
1 Songs Enter
2 3 Voting record
Hitlist
4 Songs from file to file
5 Songs
6 hit list from a file
7
hit list to a file>>> 2
title (or part)>> > Gamm
vote for Gamma Ray>>> 25
1 Songs 0 End
enter
2 3
Voting record charts
4 Songs from file to file
5 Songs
6 hit list from a file
7
hit list to a file>>> 3
Gamma Ray Birth Control 25
Peter Gunn Emerson, Lake & Palmer 23
Haitian Fight Song Charles Mingus 0
Spectrum Billy Cobham 0
Take Five Dave Brubek 0
Overnite Sensation Frank Zappa 0
Sing, Sing, Sing Gene Krupa 0
Bahamut Hazmat Modine 0
Cantaloupe Island Herbie Hankock 0
Blue Train John Coltrain
0 The North Carolina McCann 0
Pressure Mary Broadcast Band 0
Mile Stones , Miles Davis
0 0 End
1 songs enter
2 3 Voting record
Hitlist
4 Songs from file
read 5 Songs to file
6 Hitlist read from file to file
7 Hitlist
>>> 7
filename [charts.txt]>>>
0 End
1 songs enter
Voting record
2 3 4 Songs charts
read from file
5 Songs to file
6 hit list from a file
7
hit list to a file>>> 0
$
tax
Name the project 2 x - name -python-charts , where x "a" for 2AHIF and "c" and 2CHIF name your family name will be (with the same names you please 2 x - name-first name -python-charts thereof). The program itself is called charts.py . generating test data (files with songs and charts), so the program can be tested directly after checking out.
Check in the project at the CVS and "commit" your latest version.
0 comments:
Post a Comment