首页
编程语言
数据库
网络开发
Algorithm算法
移动开发
系统相关
金融统计
人工智能
其他
首页
>
> 详细
讲解Program Design、辅导Java编程、讲解music media library、Java设计辅导 辅导Python程序|解析
Curtin College
Object Oriented Program Design
Semester 2, 2018
Assignment
Due: 9am Monday 5th November 2018
Weight: 30% of the unit mark.
1 Introduction
This assignment will take significant time to implement. You cannot finish it in a single
night or weekend! You will need to plan your time carefully and work on each bit as the
topic is covered.
Your task is to create a music media library. The library will be able to perform the
following:
Store details of music stored on Records, Cassettes, and Digitally;
Read the library details from an input file;
Add songs to the library based on user input;
Calculate the total play time of all songs stored in the library;
Find a specific song (based on first occurrence name matches) and print the play
instructions for that song.
Allow the user to select a media type and option, and then print number of songs
and total run time for that type:
– Records, and the record play speed.
– Digital, and the file type.
– Cassette, and the tape side.
Save the library to a file.
Page 1 of 9OOPD Semester 2, 2018
2 Task Details
The final functionality of the music library is as follows:
2.1 Data Validation:
The details of all music must conform to the following specifications.
All songs have the following pieces of information:
Name – must not be null or an empty string.
Artist – must not be null or an empty string.
Duration – must be a real number between 0.0 and 9.59 (inclusive). This must be
a valid
.
time. ie: 9.87 is invalid.
Records have the following additional information:
Track Number – Must be an integer between 0 and 20 (inclusive).
Play Speed – Must be one of the following strings, casing does not matter:
– “33 1/3 RPM”
– “45 RPM”
– “78 RPM”
Digital tracks have the following additional information:
Type – Must be one of the following strings, casing does not matter:
– “wav”
– “mp3”
– “acc”
Cassettes have the following additional information:
Track Number – Must be an integer between 0 and 20 (inclusive).
Start Time – Must be a real number between 0.0 and 160.0 (inclusive). This must
be a valid
.
time. ie: 5.89 is invalid.
Side – Must be a character, A, or B, lowercase, or uppercase.
2.2 Add Music:
Add songs to the library based on user input, the same validation as the previous section
applies.
2.3 Total Duration:
Calculate the total play time of all songs stored in the library;
Page 2 of 9OOPD Semester 2, 2018
2.4 Play Instructions
The user should be able to see the play instructions for each song. An example for each
of the 3 music types is shows below.
Zero to Hero is track number 3 and the record is be played at 33 1/3 rpm.
Make a Man Out of You requires the wav codec to play.
Be Out Guest is track number 2, it starts at 2.30 minutes, on side A.
2.5 Search:
Find a specific song (based on first occurrence name matches) and print the play instructions
for that song. This is a simple linear search, loop through each array, and print the
instructions for the first (only the first) match. Matches should ignore case.
2.5.1 Search & Duration:
Allow the user to select a media type and option, and then print the number of songs and
total run time for that type:
Records, and the record play speed.
Digital, and the file type.
Cassette, and the tape side.
2.6 Input & Output
Input and output should be done using the techniques from the lectures and practical
sessions.
2.6.1 Input File
You will be required to load the music library from a csv file (the name of which is supplied
by the user). For each music type the csv file will conform to the following format:
Record – R,
,
,
,
,
Digital – D,
,
,
,
Cassette – C,
,
,
,
,
,
The first letter of each row must be R, D, or C (in any case), this letter indicates the type
of music the row is for. Below is an example input:
R,Zero to Hero,The Muses,4.37,3,33 1/3 RPM
D,Make a Man Out of You,Mulan and Chang,3.57,WAV
C,Be Our Guest,The Dishes,2.57,2,2.3,a
Page 3 of 9OOPD Semester 2, 2018
Any malformed rows should be discarded when reading the file and an appropriate message
displayed to the user informing them of such, the remainder of the file should continue to
be read. The file itself may also be empty, your algorithm should check for this and print
an appropriate error message.
2.6.2 Output File
Your program must be able to save the current music library, to a file that conforms to
the same format as the input file. That is, the generated output file must be able to be
used on the next run of the program to “restore” the library to the same state. All real
numbers should be formatted to 2 decimal places.
2.6.3 User Input
All user input must be validated where appropriate.
2.7 User Output
All output to the user should be formatted in a pleasant, easy to read manner. This
include prompts for input. All real numbers should be formatted to 2 decimal places.
2.8 Error Handling
Under no circumstance should the user be aware of exception handling, this includes
having unhandled exceptions, and the user seeing any form of a stack trace.
All error messages displayed to the user should be meaningful to a non-programmer.
3 Documentation
You must thoroughly document your code using block comments (/*...*/) and in-line
comments (//...). For each Class, you must place a comment at the top of the file
containing your name, the file name, the purpose of the class and any modification history.
For each method you write you must place a comment immediately above it explaining
its purpose, its import and export values, and how it works. Other comments must be
included as necessary.
Page 4 of 9OOPD Semester 2, 2018
4 Submission Requirements
Assignments should be submitted online via Moodle.
Your submission should include:
The Design:
Pseudocode implementation of the algorithms.
The Code:
.java files implementing your psuedocode design (Do not submit .class files.)
.java files used to test your program
The Documentation
A PDF report, as outlined Below
You are responsible for ensuring that your submission is correct and not corrupted. You
may make multiple submissions, but only your latest submission will be marked. You
should download your submission, extract the contents and ensure it still compiles/runs.
Please note that code should adhere to standard Java coding style and practices
Page 5 of 9
4.1 Report
Your submission must include a one and a half (1.5) page page report. In the report you
must discuss the following:
Justify your menu implementation decisions.
Justify your approach to data validation.
Justify your design decisions in regards to what functionality was placed in the
container classes, and what functionality was placed elsewhere.
Discuss any complications inheritance introduced in your design.
Discuss and justify any down casting present in our code.
Discuss any challenges you had in your implementation/design.
Discuss any challenges you had in your implementation/design.OOPD Semester 2, 2018
5 Marking
The pseudocode algorithm and Java implementation will both be marked. Your java code
will be assessed by its suitability as a valid implementation of your supplied pseudocode.
The demonstration requirements for each submission are described above. Marks will be
allocated for the appropriate choices of classes, the overall functionality, and adhering to
best programming practices as discussed in the lectures and practicals.
Quizzes:
You cannot pass the assignment without attending your weekly tutorial and attempting
your quizzes. This assignment will be weighted by the top two quiz marks as shown below.
Your total Quiz mark will be awarded as a mark out of 10, which will have the following
effect (multiplier) on the assignment mark.
Total Quiz Mark Effect
7 - 10 100%
6 90%
5 80%
4 70%
3 50%
0 - 2 30%
Page 6 of 9OOPD Semester 2, 2018
6 Academic Misconduct – Plagiarism and Collusion
If you accept or copy code (or other material) from other people, websites, etc. and submit it,
you are guilty of plagiarism, unless you correctly cite your source(s).
Even if you extensively modify their code, it is still plagiarism.
Exchanging assignment solutions, or parts thereof, with other students is collusion.
Engaging in such activities may lead to failing the unit, or other penalties. Serious or repeated
offences may result in termination or expulsion as per the Curtin College Academic Integrity
Policy.
You are expected to understand this at all times, across all your studies, with or without
warnings like this.
Refer to The Curtin College Academic Integrity Policy for additional guidance.
Page 7 of 9OOPD Semester 2, 2018
7 Design Brief
The following details some hints and tips you should follow in order to not be penalised
in the assignment:
Java file structure: you should have at a minimum the following classes:
MusicLibrary – Where the main method is located. Your main should only have
the high-level last resort exception handling, and should call the menu from
the UserInterface class.
UserInterface – This class should have all the user I/O. Including validation for
said I/O. The UserInterface class should have no static methods ie: you must
create an object of it.
FileManager – This class should have all the file I/O methods.
MusicCollection – This manages manages the functionality. The controller
classshould have no static methods ie: you must create an object of it.
To have the search method take a String, you will need to treat the cassette side
search criteria as a string.
The storage facility (MusicCollection) should only be constructed once. It must initially
be constructed based on file input ie: you cannot perform any operations on the
library until it is constructed. Subsequent attempts to construct the library should
fail and an appropriate error message output to the user ie: you cannot read another
file.
You should have a single array of the superclass(Music). The max number of
objects stored in this array should be 30, the objects may be of any type in any
order.
You should only need to refer to the exact subclass when initially constructing an
object.
You will need to make good use of abstract methods (in the diagram below, an
abstract method is represented with italic text)
The basic UML for the container classes is shown below. You will require all the accessors
and mutators as emphasised in the lectures and practicals (these are omitted below for
simplicity). The methods in MusicCollection have also been left for you to decide.
Page 8 of 9OOPD Semester 2, 2018
MusicCollection
- musicArray[30]
...
Music
- name
- artist
- duration
+ play(): String
+ search(String): boolean
+ clone(): Music
Digital
- type
+ play(): String
+ search(String): boolean
+ clone(): Music
Record
- trackNumber
- playSpeed
+ play(): String
+ search(String): boolean
+ clone(): Music
Cassette
- trackNumber
- startTime
- side
+ play(): String
+ search(String): boolean
+ clone(): Music
0..30
End of Assignment
Page 9 of 9
联系我们
QQ:99515681
邮箱:99515681@qq.com
工作时间:8:00-21:00
微信:codinghelp
热点文章
更多
辅导 comm2000 creating socia...
2026-01-08
讲解 isen1000 – introductio...
2026-01-08
讲解 cme213 radix sort讲解 c...
2026-01-08
辅导 csc370 database讲解 迭代
2026-01-08
讲解 ca2401 a list of colleg...
2026-01-08
讲解 nfe2140 midi scale play...
2026-01-08
讲解 ca2401 the universal li...
2026-01-08
辅导 engg7302 advanced compu...
2026-01-08
辅导 comp331/557 – class te...
2026-01-08
讲解 soft2412 comp9412 exam辅...
2026-01-08
讲解 scenario # 1 honesty讲解...
2026-01-08
讲解 002499 accounting infor...
2026-01-08
讲解 comp9313 2021t3 project...
2026-01-08
讲解 stat1201 analysis of sc...
2026-01-08
辅导 stat5611: statistical m...
2026-01-08
辅导 mth2010-mth2015 - multi...
2026-01-08
辅导 eeet2387 switched mode ...
2026-01-08
讲解 an online payment servi...
2026-01-08
讲解 textfilter辅导 r语言
2026-01-08
讲解 rutgers ece 434 linux o...
2026-01-08
热点标签
mktg2509
csci 2600
38170
lng302
csse3010
phas3226
77938
arch1162
engn4536/engn6536
acx5903
comp151101
phl245
cse12
comp9312
stat3016/6016
phas0038
comp2140
6qqmb312
xjco3011
rest0005
ematm0051
5qqmn219
lubs5062m
eee8155
cege0100
eap033
artd1109
mat246
etc3430
ecmm462
mis102
inft6800
ddes9903
comp6521
comp9517
comp3331/9331
comp4337
comp6008
comp9414
bu.231.790.81
man00150m
csb352h
math1041
eengm4100
isys1002
08
6057cem
mktg3504
mthm036
mtrx1701
mth3241
eeee3086
cmp-7038b
cmp-7000a
ints4010
econ2151
infs5710
fins5516
fin3309
fins5510
gsoe9340
math2007
math2036
soee5010
mark3088
infs3605
elec9714
comp2271
ma214
comp2211
infs3604
600426
sit254
acct3091
bbt405
msin0116
com107/com113
mark5826
sit120
comp9021
eco2101
eeen40700
cs253
ece3114
ecmm447
chns3000
math377
itd102
comp9444
comp(2041|9044)
econ0060
econ7230
mgt001371
ecs-323
cs6250
mgdi60012
mdia2012
comm221001
comm5000
ma1008
engl642
econ241
com333
math367
mis201
nbs-7041x
meek16104
econ2003
comm1190
mbas902
comp-1027
dpst1091
comp7315
eppd1033
m06
ee3025
msci231
bb113/bbs1063
fc709
comp3425
comp9417
econ42915
cb9101
math1102e
chme0017
fc307
mkt60104
5522usst
litr1-uc6201.200
ee1102
cosc2803
math39512
omp9727
int2067/int5051
bsb151
mgt253
fc021
babs2202
mis2002s
phya21
18-213
cege0012
mdia1002
math38032
mech5125
07
cisc102
mgx3110
cs240
11175
fin3020s
eco3420
ictten622
comp9727
cpt111
de114102d
mgm320h5s
bafi1019
math21112
efim20036
mn-3503
fins5568
110.807
bcpm000028
info6030
bma0092
bcpm0054
math20212
ce335
cs365
cenv6141
ftec5580
math2010
ec3450
comm1170
ecmt1010
csci-ua.0480-003
econ12-200
ib3960
ectb60h3f
cs247—assignment
tk3163
ics3u
ib3j80
comp20008
comp9334
eppd1063
acct2343
cct109
isys1055/3412
math350-real
math2014
eec180
stat141b
econ2101
msinm014/msing014/msing014b
fit2004
comp643
bu1002
cm2030
联系我们
- QQ: 99515681 微信:codinghelp
© 2024
www.7daixie.com
站长地图
程序辅导网!