aboutsummaryrefslogtreecommitdiff
path: root/report/report.ms
blob: a399291939629afd4036bb6ff6d3e94e063b580c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
.TL
jMusicHub - OOP Project Report

.AU
Aimeric ADJUTOR

.AI
ESIEA

.AB
This document comes with a javadoc and files for a program named jMusicHub.
Here, I'll try to state why I did some stuff the way I did, the tools I used, the difficulties, and so on..
.PP
Everything is actually available at my own git server at
.UL "git.adjutor.xyz" .
.PP
You can easily clone the project from there.
.AE

.NH
UML Diagram

.PP
You can zoom-in easily since the quality of the diagramm is great.
.
.PSPIC ../umlDiagram/output.eps 8

.bp

.NH
Student contribution

.PP
Since I did it alone, every part of the code has been done by myself.

.PP
I used different kinds of help when I was confronted to some errors and also to learn new things because I'm new with the Java programming language.
.PP
My main sources of knowledge comes from Stackoverflow, javaTpoint, Oracle and w3schools.

.NH
Work done

.NH 2
Tools

.PP
For starters, the tools I used for this project are :
.IP \(bu 2
Void linux, as my OS.
.IP \(bu 2
Neovim, as my text editor alongside some plugins and snippets to make my life easier.
.IP \(bu 2
Deoplete, ultisnips and vim-javacomplete2 as my vim plugins.
.IP \(bu 2
Plantuml and groff to, respectively, generate my UML diagram and my report.

.NH 2
Code

.NH 3
Generalities

.PP
I coded with some freedom as the specifications were sometimes not clear. I suppose it was written this way to mimic specifications done by a client.
.PP
My "main" program is jMusicHub.java, it's basically the app you'll want to run to do anything. The other files are just the different objects that we create thanks to jMusicHub.
.PP
The whole thing can actually be launched by using the run file (./run). It's just a simple bash program that compile (javac) and launch (java).
.PP
Lots of commands are available so a quick peek at the help page (h) is recommended.

.NH 3
Classes and enums
.PP
I made four classes that are meant to be Serialized : Song, AudioBook, Album and Playlist.
.PP
Those are instanciated into objects a lot since they're the base of an app managing songs and other elements evolving around it.
.PP
Song and AudioBook both extend the MusicalElement which is an abstraction class. But Album and Playlist are standalone, they're just implementing Serializable like MusicalElement.

.PP
The other files contain the enums. There is Genre for Song but also Category and Language used as attributes for AudioBook.

.bp

.NH 2
Abstraction and Interface

.PP
The abstract class is MusicalElement which is instanciated by Song and AudioBook.
.PP
The interface used in this project is the Serializable one. It is used by MusicalElement (therefore, Song and AudioBook), Album and Playlist. It's used to store the created objects into files. One for each types (songs, audiobooks, albums and playlists).

.NH 2
Exceptions

.PP
Most exceptions are handled the same way because they appear on the same patterns.

.PP
We basically abort the tasks or create empty objects when necessary and display something to the user to keep him up-to date.
.PP
I did this to both, debug my code while testing it and to make informative messages to the user so he can know what's going on behind the program.

.NH
Difficulties

.PP
I honestly had difficulties everytime I got back on my code to build new stuffs.
The websites, given at the beginning, were really helpful.
.PP
The first big difficulty was to understand what was the Serialization and how to use it. It took me some time but thanks to websites and indications given by some classmates I managed to implement it in my code.
.PP
Other difficulties were managed by, somehow, finding a solution online or aborting my idea and using other ways to achieve what I was looking for.