首页 > > 详细

辅导CSC8406解析Java编程、Java调试

 
CSC8406 2019/2020: Object Oriented Programming 
Module Coursework (resit) 
Aims 
Improve knowledge and experience of applying Object Oriented Design and Implementation 
techniques to solving problems using the JAVA programming language, specifically with the 
aim of gaining experience in the following: 
• Programs, programming and programming environments. 
• Object-oriented programming: comments; types; variable declarations; arithmetic 
and Boolean expressions; assignment. 
• Loops and conditions; input and output. 
• Data structures: arrays and lists. 
• Simple algorithms: searching, sorting. 
• Methods. 
• Objects; inheritance; applications. 
Assessment (Deadline: 16:00, Friday, 19 June 2020) 
This coursework is marked out of a total of 100. You are required to submit the following: 
• Part 1 Source Code (75%): The main emphasis is on proficiency in Object Oriented 
Programming using Java, including: definition of classes (fields, constructors, 
methods), inheritance, exception handling, as well as appropriate use of APIs such as 
collections. One of the classes of your application should include a static method 
called main containing the evidence that you tested your program. 
• Part 2 Testing (5%): The main emphasis is on the appropriate choices for test cases. 
• Part 3 Documentation (20%): This includes appropriate Java Docs, and a well- 
structured project report (PDF, or Word document). The project report should 
include your reasoning behind your design (include also a class diagram). The project 
report should describe implementation details, and include a discussion of test 
cases. The project report should also include instructions on how to run your 
program. 
Plagiarism 
The University has strict policies for penalising plagiarism, and all work submitted for 
assessment must be your own work. This does not prohibit discussion among students 
about coursework. Indeed, such discussion to increase understanding is positively 
encouraged. However, the answers submitted must be your original contribution, written 
and designed by you. It is permissible to include some material drawn directly from other 
sources (if you think this benefits the report part of the submission), but such non-original 
material must be explicitly declared to be a quotation from an external source, and that 
source must be listed. 
 
Scenario: Music Library 
This scenario is associated with the implementation of a program that stores information 
about recorded music collections, like Apple's iTunes except that it does not have to actually 
play the songs themselves. 
• Music artists are either soloists or bands. Soloists just have a name, but bands also 
have a list of members, who may be soloists in their own right. 
• A music track has information about the track title, artist, date, the length (in time) 
of the track, the track rating (an integer), the location of the music file (MP3) and the 
size of the music file. A music track may also include a guest artist. 
• A music album has an artist, a title and an ordered list of tracks. 
• Music library programs often store the number of times a track has been played. 
 
Problem: Basic I 
• Define a Java class to store information about artists, including their name and 
membership to bands if appropriate. 
• Define a Java class to store information about music tracks. Include methods to: 
o create a track; 
o set and get the title, artist, date, length, rating, location and size of the track; 
o add a guest artist to the track; 
o get a list of all individuals on the track, including band members and guest 
artists; 
o add to the play count of a track; 
o get the play count of a track. 
 
Problem: Basic II 
• Define a Java class to represent albums. Provide methods to: 
o create an album; 
o set and get the name and type of the album and the artist; 
o define the list of tracks for the album; 
o get the overall running time of the album; 
o get the overall file size of the album; 
o get the average rating of tracks on the album. 
 
Problem: Basic III 
• Define a Java class to represent a music library. Provide methods to: 
o create a library; 
o add tracks and/or albums to the library; 
o create a list of tracks from the library with the lowest rating. 
 
 
Problem: Extensions I 
Define a special type of album, the compilation album. These albums may or may not have 
an artist, or may have a number of different artists. Each track on a compilation album 
should also store the original album that the track came from. For example, Bohemian 
Rhapsody by Queen was originally on the album A Night at the Opera and subsequently 
appeared on the compilation album Greatest Hits Vol I, part of the Queen Greatest Hits 
series. 
 
Problem: Extensions II 
Write a method for a library that works out how to back up all of the music tracks onto a 
small number of discs. Different types of disc (CD, DVD) have different capacities in terms of 
total file size, so the capacity of the disc should be a parameter to the method. This is an 
example of the general problem known as bin-packing problem. 
 
Submission 
Submit all your files including documentation and source code within a properly structured 
zip folder. Submission must be done electronically through NESS. 
 
Deadline: 16:00 on Friday 19 June 2020 
 
 
联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!