Computational thinking for a software developer/computer programmer is a critical skill that is consistently applied. This lab requires you to develop a solution using Java object-oriented programming that simulates creating and managing a collection of songs. The system manages information about a collection of songs. The system stores the following information (for each attribute, choose any type that you think is appropriate--you must be able to justify the decisions you make): Collection Name: the name for the collections of songs Collection list of songs: the system allows you to create a collection with unlimited songs. You can add the same song multiple times to any given collection. Hence, the collection allows songs to be duplicated Note: other system functionalities can be inferred from the given JUnit test. o NoSystem.out.printlnstatementsshouldappearinit. o NoScanneroperations(e.g.,input.nextInt())shouldappearinit. Instead, declare the method's input parameters as indicated by the JUnit tests. code for song.java : public class Song { // ALREADY IMPLEMENTED; DO NOT MODIFY private String songArtist; private String songTitle; private String songAlbum; private double songPrice; private int songYear; private int songLength; // Length in seconds   // ALREADY IMPLEMENTED; DO NOT MODIFY public Song(String songTitle, String songArtist, String songAlbum, int songYear, int songLength, double songPrice) {   this.songArtist = songArtist; this.songTitle = songTitle; this.songAlbum = songAlbum; this.songPrice = songPrice; this.songYear = songYear; this.songLength = songLength; // length in seconds } // ALREADY IMPLEMENTED; DO NOT MODIFY public String getSongArtist() { return songArtist; } // ALREADY IMPLEMENTED; DO NOT MODIFY public void setSongArtist(String songArtist) { this.songArtist = songArtist; } // ALREADY IMPLEMENTED; DO NOT MODIFY public String getSongTitle() { return songTitle; } // ALREADY IMPLEMENTED; DO NOT MODIFY public void setSongTitle(String songTitle) { this.songTitle = songTitle; } // ALREADY IMPLEMENTED; DO NOT MODIFY public String getSongAlbum() { return songAlbum; } // ALREADY IMPLEMENTED; DO NOT MODIFY public void setSongAlbum(String songAlbum) { this.songAlbum = songAlbum; }   public double getSongPrice() { return songPrice; } // ALREADY IMPLEMENTED; DO NOT MODIFY public void setSongPrice(double songPrice) { this.songPrice = songPrice; } // ALREADY IMPLEMENTED; DO NOT MODIFY public int getSongYear() { return songYear; } // ALREADY IMPLEMENTED; DO NOT MODIFY public void setSongYear(int songYear) { this.songYear = songYear; }   public int getSongLength() { return songLength; } // ALREADY IMPLEMENTED; DO NOT MODIFY public void setSongLength(int songLength) { this.songLength = songLength; } // ALREADY IMPLEMENTED; DO NOT MODIFY @Override public String toString() { return String.format("Song|%-20s|%-15s|%-20s|%6s|%d:%02d|%6.2f", this.songTitle, this.songArtist, this.songAlbum, this.songYear > 0 ? String.format("%d", this.songYear) : "", this.songLength / 60, this.songLength % 60, this.songPrice); } // ALREADY IMPLEMENTED; DO NOT MODIFY @Override public int hashCode() { return Objects.hash(songAlbum, songArtist, songLength, songPrice, songTitle, songYear); } // ALREADY IMPLEMENTED; DO NOT MODIFY @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Song other = (Song) obj; return Objects.equals(songAlbum, other.songAlbum) && Objects.equals(songArtist, other.songArtist) && songLength == other.songLength && Double.doubleToLongBits(songPrice) == Double.doubleToLongBits(other.songPrice) && Objects.equals(songTitle, other.songTitle) && songYear == other.songYear; }} i need code for songCollection.java

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Computational thinking for a software developer/computer programmer is a critical skill that is consistently applied. This lab requires you to develop a solution using Java object-oriented programming that simulates creating and managing a collection of songs.

The system manages information about a collection of songs. The system stores the following information (for each attribute, choose any type that you think is appropriate--you must be able to justify the decisions you make):

Collection Name: the name for the collections of songs

Collection list of songs: the system allows you to create a collection with unlimited

songs. You can add the same song multiple times to any given collection. Hence, the collection allows songs to be duplicated

Note: other system functionalities can be inferred from the given JUnit test.

o NoSystem.out.printlnstatementsshouldappearinit.
o NoScanneroperations(e.g.,input.nextInt())shouldappearinit.

Instead, declare the method's input parameters as indicated by the JUnit tests.
code for song.java :

public class Song {

// ALREADY IMPLEMENTED; DO NOT MODIFY

private String songArtist;

private String songTitle;

private String songAlbum;

private double songPrice;

private int songYear;

private int songLength; // Length in seconds

 

// ALREADY IMPLEMENTED; DO NOT MODIFY

public Song(String songTitle, String songArtist, String songAlbum,

int songYear, int songLength, double songPrice) {

 

this.songArtist = songArtist;

this.songTitle = songTitle;

this.songAlbum = songAlbum;

this.songPrice = songPrice;

this.songYear = songYear;

this.songLength = songLength; // length in seconds

}

// ALREADY IMPLEMENTED; DO NOT MODIFY

public String getSongArtist() {

return songArtist;

}

// ALREADY IMPLEMENTED; DO NOT MODIFY

public void setSongArtist(String songArtist) {

this.songArtist = songArtist;

}

// ALREADY IMPLEMENTED; DO NOT MODIFY

public String getSongTitle() {

return songTitle;

}

// ALREADY IMPLEMENTED; DO NOT MODIFY

public void setSongTitle(String songTitle) {

this.songTitle = songTitle;

}

// ALREADY IMPLEMENTED; DO NOT MODIFY

public String getSongAlbum() {

return songAlbum;

}

// ALREADY IMPLEMENTED; DO NOT MODIFY

public void setSongAlbum(String songAlbum) {

this.songAlbum = songAlbum;

}

 

public double getSongPrice() {

return songPrice;

}

// ALREADY IMPLEMENTED; DO NOT MODIFY

public void setSongPrice(double songPrice) {

this.songPrice = songPrice;

}

// ALREADY IMPLEMENTED; DO NOT MODIFY

public int getSongYear() {

return songYear;

}

// ALREADY IMPLEMENTED; DO NOT MODIFY

public void setSongYear(int songYear) {

this.songYear = songYear;

}

 

public int getSongLength() {

return songLength;

}

// ALREADY IMPLEMENTED; DO NOT MODIFY

public void setSongLength(int songLength) {

this.songLength = songLength;

}

// ALREADY IMPLEMENTED; DO NOT MODIFY

@Override

public String toString() {

return String.format("Song|%-20s|%-15s|%-20s|%6s|%d:%02d|%6.2f", this.songTitle, this.songArtist,

this.songAlbum, this.songYear > 0 ? String.format("%d", this.songYear) : "", this.songLength / 60,

this.songLength % 60, this.songPrice);

}

// ALREADY IMPLEMENTED; DO NOT MODIFY

@Override

public int hashCode() {

return Objects.hash(songAlbum, songArtist, songLength, songPrice, songTitle, songYear);

}

// ALREADY IMPLEMENTED; DO NOT MODIFY

@Override

public boolean equals(Object obj) {

if (this == obj)

return true;

if (obj == null)

return false;

if (getClass() != obj.getClass())

return false;

Song other = (Song) obj;

return Objects.equals(songAlbum, other.songAlbum) && Objects.equals(songArtist, other.songArtist)

&& songLength == other.songLength

&& Double.doubleToLongBits(songPrice) == Double.doubleToLongBits(other.songPrice)

&& Objects.equals(songTitle, other.songTitle) && songYear == other.songYear;

}}
i need code for songCollection.java

Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Data members
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education