代做Program Design作业、代写Java编程作业、代做music media library作业、Java课程设计作业代写


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 9
OOPD 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 <min>.<sec> 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 <min>.<sec> 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 9
OOPD 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,<Name>,<Artist>,<Duration>,<Track Number>,<Play Speed>
Digital – D,<Name>,<Artist>,<Duration>,<File Type>
Cassette – C,<Name>,<Artist>,<Duration>,<Track Number>,<Start Time>,<Side>
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 9
OOPD 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 9
OOPD 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 9
OOPD 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 9
OOPD 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 9
OOPD Semester 2, 2018
MusicCollection
- musicArray[30]
...http://www.6daixie.com/contents/9/1949.html
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

因为专业,所以值得信赖。如有需要,请加QQ99515681 或邮箱:[email protected] 

微信:codinghelp

猜你喜欢

转载自www.cnblogs.com/RRRRcodinghelp/p/9787484.html