Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

its for data structure class please do in java [A1] Top Streaming Artists Learning Objectives Review prerequisite Java programming knowledge by putting together a small

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
its for data structure class please do in java
[A1] Top Streaming Artists Learning Objectives Review prerequisite Java programming knowledge by putting together a small project Review the of the Java array type, scaling to 2D arrays Review of Java OOP concepts with creating classes, and instantiating them Create custom linked list class with appropriate members and methods Compare the operations for working with the array type and linked list Problem Description A record label executive received text files that contain the top streamed music artists during certain weeks. Each file represents one track by an artist. One track means one song. An artist's name might appear multiple times. The data comes from Spotify Charts In order for their in house IT to be able to process the information, they need someone to help process it. Each text file is a comma separated value (CSV) file that has a few columns like the following table 3: Position Track Name Artist Streams URL Drake, Wizkid, Kyla 1 One Dance 2 Lean On 3 Sunflower - Spider-Man: Into the Spider-Verse 4 Somebody That I Used to know 5 Rolling in the Deep Major Lazer, M, DJ Snake Post Malone, Swae Lee Gotye, Kimbra Adele Because it's a CSV file, column delimiters are written with a symbol. Each line in the text file represents one song. Position, "Track Name" Artist Streams. URL Who appears on the top streamed list? Who appears on the top streamed list? First, the exec wants to know which artists appears on the list and how many times they appear. Prepare an output file with contents of your nested array so that the record label executive can see this report. Note on data links: These links are provided merely for quick access to data files. You may choose to download any date or country from Spotify Charts of interest. Best practice with any type of data work is to provide a note on whichever data you select and rationale for doing so. Link to Data Extract 1: Week ending Jan 23, 2020 (Global) . Link to Data Extract 2: Week ending Jan 23, 2020 (US) Not knowing data structures yet, it seems the way to proceed quickly at building is with Java arrays. Read in the text file and then save the CSV file format into a nested Java array like myList below. If an artist appears multiple times, then that artist probably should only appear once in your nested array "Java nested array syntax int cols 4: I arbitrary number represents columns to create int rows = 10; // arbitrary number represents rows to create; String myList = new String[rows][cols); int[] arr {{1,2},{3,4} }; System.out.println("arr[0][0] = " + art[0][0]; Will you limit to just the artist name? Perhaps you should discuss your decision with your class colleagues Who are the music artists in alphabetical order)? It just so happens that this imaginary VIP client has a thing for alphabetized lists and wants to see the artist names in alphabetical order. Since you learned about linked lists in class, you should know how to create one. You can probably take the array from part 1, which is hopefully a truncated version of the raw data, and insert artist names into a sorted linked list. You may use the example classes below to start with to design a sorted list of TopStreamingArtists. You may also create your own classes. The classes work like templates because they offer a blueprint, where you can reuse the object oriented structure by creating objects from those classes. * A node represents an artist class Artist private String name: You may use the example classes below to start with to design a sorted list of TopStreamingArtists. You may also create your own classes. The classes work like templates because they offer a blueprint, where you can reuse the object oriented structure by creating objects from those classes Anode represents an artist class Artist private String name: private Artist next add constructors The List TopStreaming Artists is composed of a series of artist names class TopStreaming Artists private Artist first: public void TopStreaming Artists({ first = null; public boolean isEmpty return (firstum null): Using the linked list structure youve designed and created, you can resume with the data processing in order to provide another report to the insert an artist name to the TopStreamingArtists linked list. public static void main(String[] args) { TopStreaming Artists artist Names new TopStreaming Artists artistNames.insert("Stage Name"); artistNames displayList(): Make sure to print out the report for the exec showing the data in ascending order by Artist name. Where to Submit Please fill out this form (link not yet available) - - ------- Innaar m i r should have the elements described in the project pilvale Artist next; // add constructors /* The List TopStreamingArtists is composed of a series of artist names */ class TopStreamingArtists { private Artist first; public void TopStreamingArtists() { first = null; public boolean isEmpty(){ return (first null); Using the linked list structure you've designed and created, you can resume with the data processing in o TopStreamingArtists linked list. public static void main(String[] args) { TopStreamingArtists artistNames = new TopStreamingArtists(); artistNames.insert("Stage Name"); artistNames.displayList(); Make sure to print out the report for the exec showing the data in ascending order by Artist name. Where to Submit Please fill out this form (link not yet available) What you should submit is a link to where your code repository is located. Your code repository should have the el the items asked for in parts 1 and 2 above. Specifically: TODO How did you organize your files? TODO Who appears on the top streamed list? TODO Who are the music artists (in alphabetical order)? 1 . [A1] Top Streaming Artists Learning Objectives Review prerequisite Java programming knowledge by putting together a small project Review the of the Java array type, scaling to 2D arrays Review of Java OOP concepts with creating classes, and instantiating them Create custom linked list class with appropriate members and methods Compare the operations for working with the array type and linked list Problem Description A record label executive received text files that contain the top streamed music artists during certain weeks. Each file represents one track by an artist. One track means one song. An artist's name might appear multiple times. The data comes from Spotify Charts In order for their in house IT to be able to process the information, they need someone to help process it. Each text file is a comma separated value (CSV) file that has a few columns like the following table 3: Position Track Name Artist Streams URL Drake, Wizkid, Kyla 1 One Dance 2 Lean On 3 Sunflower - Spider-Man: Into the Spider-Verse 4 Somebody That I Used to know 5 Rolling in the Deep Major Lazer, M, DJ Snake Post Malone, Swae Lee Gotye, Kimbra Adele Because it's a CSV file, column delimiters are written with a symbol. Each line in the text file represents one song. Position, "Track Name" Artist Streams. URL Who appears on the top streamed list? Who appears on the top streamed list? First, the exec wants to know which artists appears on the list and how many times they appear. Prepare an output file with contents of your nested array so that the record label executive can see this report. Note on data links: These links are provided merely for quick access to data files. You may choose to download any date or country from Spotify Charts of interest. Best practice with any type of data work is to provide a note on whichever data you select and rationale for doing so. Link to Data Extract 1: Week ending Jan 23, 2020 (Global) . Link to Data Extract 2: Week ending Jan 23, 2020 (US) Not knowing data structures yet, it seems the way to proceed quickly at building is with Java arrays. Read in the text file and then save the CSV file format into a nested Java array like myList below. If an artist appears multiple times, then that artist probably should only appear once in your nested array "Java nested array syntax int cols 4: I arbitrary number represents columns to create int rows = 10; // arbitrary number represents rows to create; String myList = new String[rows][cols); int[] arr {{1,2},{3,4} }; System.out.println("arr[0][0] = " + art[0][0]; Will you limit to just the artist name? Perhaps you should discuss your decision with your class colleagues Who are the music artists in alphabetical order)? It just so happens that this imaginary VIP client has a thing for alphabetized lists and wants to see the artist names in alphabetical order. Since you learned about linked lists in class, you should know how to create one. You can probably take the array from part 1, which is hopefully a truncated version of the raw data, and insert artist names into a sorted linked list. You may use the example classes below to start with to design a sorted list of TopStreamingArtists. You may also create your own classes. The classes work like templates because they offer a blueprint, where you can reuse the object oriented structure by creating objects from those classes. * A node represents an artist class Artist private String name: You may use the example classes below to start with to design a sorted list of TopStreamingArtists. You may also create your own classes. The classes work like templates because they offer a blueprint, where you can reuse the object oriented structure by creating objects from those classes Anode represents an artist class Artist private String name: private Artist next add constructors The List TopStreaming Artists is composed of a series of artist names class TopStreaming Artists private Artist first: public void TopStreaming Artists({ first = null; public boolean isEmpty return (firstum null): Using the linked list structure youve designed and created, you can resume with the data processing in order to provide another report to the insert an artist name to the TopStreamingArtists linked list. public static void main(String[] args) { TopStreaming Artists artist Names new TopStreaming Artists artistNames.insert("Stage Name"); artistNames displayList(): Make sure to print out the report for the exec showing the data in ascending order by Artist name. Where to Submit Please fill out this form (link not yet available) - - ------- Innaar m i r should have the elements described in the project pilvale Artist next; // add constructors /* The List TopStreamingArtists is composed of a series of artist names */ class TopStreamingArtists { private Artist first; public void TopStreamingArtists() { first = null; public boolean isEmpty(){ return (first null); Using the linked list structure you've designed and created, you can resume with the data processing in o TopStreamingArtists linked list. public static void main(String[] args) { TopStreamingArtists artistNames = new TopStreamingArtists(); artistNames.insert("Stage Name"); artistNames.displayList(); Make sure to print out the report for the exec showing the data in ascending order by Artist name. Where to Submit Please fill out this form (link not yet available) What you should submit is a link to where your code repository is located. Your code repository should have the el the items asked for in parts 1 and 2 above. Specifically: TODO How did you organize your files? TODO Who appears on the top streamed list? TODO Who are the music artists (in alphabetical order)? 1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions