Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

can you please program this in java, thanks. 8.12 LAB: Playlist (output linked list) Given maino, complete the SongNode class to include the printSonginfo() method.

can you please program this in java, thanks. image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
8.12 LAB: Playlist (output linked list) Given maino, complete the SongNode class to include the printSonginfo() method. Then write the Playlist class printPlaylist() method to print all songs in the playlist, DO NOT print the dummy head node. Ex If the input is Stomp 380 The Brothers Johnson the Dude 337 Quincy Jones You Don't On Me 151 Lesley Gore -1 the outputs LIOS OF SONGS Titlet stomp Length: 380 tatt The Brothers Johnson Titlet the Dudo Length: 337 VA >CSC 201: Computer Science l home > 8.12: LAB: Playlist (output linked list) zyBooks catalog the output is LIST OF SONGS Title: Stomp ! Length: 380 Artist: The Brothers Johnson Title: The Dude Length: 337 Artist: Quincy Jones Title: You Don't Own Me Length: 151 Artist: Lesley Gore 205874 LAN ACTIVITY 8.121 LAB Playlist (output linked list) 0/10 Current file Playlist java Loud default template import java.util.Scanners 2 3 public class Playlist // TODO: Write nethod to cuptut list of songs public static void main(String args) { Scanner sehr = new Scanner(System.in); 2 A w > CSC 201 Computer Science l home > 8.12: LAB Playlist (output linked list) zyBooks catalog 25571320808 LAB ACTIVITY 8.121 LAB: Playlist (output linked list) 0/10 Current file: Playlist.java- Load default template 4 5 I 8 1 import java.util.Scanner; 2 3 public class Playlist W TODO: Write method to cuptut list of songs 6 7 public static void main(String args) { Scanner sonr-new Scanner(System.in); 9 10 SongNode headNode; SongNode currNode; 12 SongNode lastNode; String songTitle: int songLength: 16 String sangArtist; 17 W Front of nodes list 11 13 14 15 18 Develop mode Submit mode Run your program as often as you'd like, before submitting for grading. Below, type any needed input values in the first box, then click Run program and observe the program's output in the second box Enter program input (optional) if your code requires input values, provide them here 6 SV W /A LAB ACTIVITY 8121-LAB: Playlist (output linked list) 0/10 Current file: SongNode.java Lond default template 1 public class SongNode private String songTitle; 3 private int songl.ength; 4 private String songArtist; S private SongNode nextNodeRef; // Reference to the next node 6 7 public SongNode 8 songTitle 9 songl.ength - 10 songArtist - ""; 11 nextNodeRef - null; 12 } 13 1 14 1/ Constructor 15 public SongNode(String songTitleinit, int songtengthenit, String songArtistinit) 16 this song title - songtitleInit; 17 this songLength - songLengthinit; 18 this songArtist - songArtistinit; Develop mode Submit mode Run your program as often as you'd like, before submitting for grading Below type any needed Input values in the first box, then click Run program and observe the program's output in the Second box Enter program input (optional) if your code required input value, provide them here. IV w

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

More Books

Students also viewed these Databases questions