From 931e9b43e6292de07f3103d9ec3bc3f243abc1ae Mon Sep 17 00:00:00 2001 From: LordBaryhobal Date: Tue, 30 Apr 2024 15:50:02 +0200 Subject: [PATCH] task 1.1 --- src/ch/hevs/isc/slopify_v2/Album.scala | 7 +++++++ src/ch/hevs/isc/slopify_v2/Artist.scala | 7 +++++++ src/ch/hevs/isc/slopify_v2/DataBase.scala | 7 +++++++ src/ch/hevs/isc/slopify_v2/Song.scala | 5 +++++ 4 files changed, 26 insertions(+) create mode 100644 src/ch/hevs/isc/slopify_v2/Album.scala create mode 100644 src/ch/hevs/isc/slopify_v2/Artist.scala create mode 100644 src/ch/hevs/isc/slopify_v2/DataBase.scala create mode 100644 src/ch/hevs/isc/slopify_v2/Song.scala diff --git a/src/ch/hevs/isc/slopify_v2/Album.scala b/src/ch/hevs/isc/slopify_v2/Album.scala new file mode 100644 index 0000000..1ba3b5f --- /dev/null +++ b/src/ch/hevs/isc/slopify_v2/Album.scala @@ -0,0 +1,7 @@ +package ch.hevs.isc.slopify_v2 + +import scala.collection.mutable.ArrayBuffer + +class Album(val name: String) { + private var songs: ArrayBuffer[Song] = new ArrayBuffer() +} diff --git a/src/ch/hevs/isc/slopify_v2/Artist.scala b/src/ch/hevs/isc/slopify_v2/Artist.scala new file mode 100644 index 0000000..eeedd64 --- /dev/null +++ b/src/ch/hevs/isc/slopify_v2/Artist.scala @@ -0,0 +1,7 @@ +package ch.hevs.isc.slopify_v2 + +import scala.collection.mutable.ArrayBuffer + +class Artist(val name: String) { + private var albums: ArrayBuffer[Album] = new ArrayBuffer() +} diff --git a/src/ch/hevs/isc/slopify_v2/DataBase.scala b/src/ch/hevs/isc/slopify_v2/DataBase.scala new file mode 100644 index 0000000..c1214a1 --- /dev/null +++ b/src/ch/hevs/isc/slopify_v2/DataBase.scala @@ -0,0 +1,7 @@ +package ch.hevs.isc.slopify_v2 + +import scala.collection.mutable.ArrayBuffer + +class DataBase { + private var artists: ArrayBuffer[Artist] = new ArrayBuffer() +} diff --git a/src/ch/hevs/isc/slopify_v2/Song.scala b/src/ch/hevs/isc/slopify_v2/Song.scala new file mode 100644 index 0000000..e16241a --- /dev/null +++ b/src/ch/hevs/isc/slopify_v2/Song.scala @@ -0,0 +1,5 @@ +package ch.hevs.isc.slopify_v2 + +class Song(val title: String, val number: Int) { + +}