1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Kazeer [188]
3 years ago
9

CHANGE POSITION OF SONG Enter song's current position: Enter new position for song: "Peg" moved to position 3 JAMZ PLAYLIST MENU

a - Add song r - Remove song c - Change position of song s - Output songs by specific artist t - Output total time of playlist (in seconds) o - Output full playlist q - Quit Choose an option: JAMZ - OUTPUT FULL PLAYLIST
1. Unique ID: JJ234 Song Name: All For You Artist Name: Janet Jackson Song Length (in seconds): 391
2. Unique ID: J345 Song Name: Canned Heat Artist Name: Jamiroquai Song Length (in seconds): 330
3. Unique ID: SD123 Song Name: Peg Artist Name: Steely Dan Song Length (in seconds): 237
4. Unique ID: JJ456 Song Name: Black Eagle Artist Name: Janet Jackson Song Length (in seconds): 197
5. Unique ID: SD567 Song Name: I Got The News Artist Name: Steely Dan Song Length (in seconds): 306

JAMZ PLAYLIST MENU a - Add song r - Remove song c - Change position of song s - Output songs by specific artist t - Output total time of playlist (in seconds) o - Output full playlist q - Quit Choose an option:
Computers and Technology
1 answer:
hichkok12 [17]3 years ago
6 0

Answer:

Answers can be found below

Explanation:

port java.util.Scanner;

public class Playlist {

String title;

SongEntry head;

public Playlist(String title) {

this.title = title;

this.head = null;

}

public static void main(String[] args) {

Scanner scanner = new Scanner(System.in);

System.out.println("Enter the playlist's title:");

String title = scanner.nextLine();

Playlist playList = new Playlist(title);

String option;

do {

option = playList.printMenu(scanner);

switch (option) {

case "a":

playList.addSong(scanner);

break;

case "d":

playList.removeSong(scanner);

break;

case "c":

playList.changePosition(scanner);

break;

case "s":

playList.outputSongByArtist(scanner);

break;

case "t":

playList.outpuTotalTime();

break;

case "o":

playList.outputFullPlayList();

break;

case "q":

System.out.println("QUIT");

break;

default:

System.out.println("please enter a valid option");

}

} while (!option.equals("q"));

}

public String printMenu(Scanner scanner) {

System.out.println(this.title + " PLAYLIST MENU");

System.out.println("a - Add song");

System.out.println("d - Remove song");

System.out.println("c - Change position of song");

System.out.println("s - Output songs by specific artist");

System.out.println("t - Output total time of playlist (in seconds)");

System.out.println("o - Output full playlist");

System.out.println("q - Quit");

System.out.println("Choose an option:");

String input = scanner.nextLine();

return input;

}

public void outputFullPlayList() {

if (head == null) {

System.out.println("Playlist is empty");

} else {

SongEntry tempNode = head;

while (tempNode != null) {

tempNode.printPlaylistSongs();

tempNode = tempNode.getNextNode();

}

}

}

public void addSong(Scanner scanner) {

System.out.println("ADD SONG");

System.out.println("Enter song's unique ID:");

String uniqueId = scanner.nextLine();

System.out.println("Enter song's name:");

String songName = scanner.nextLine();

System.out.println("Enter artist's name:");

String artistName = scanner.nextLine();

System.out.println("Enter song's length (in seconds):");

int length = Integer.parseInt(scanner.nextLine());

SongEntry song = new SongEntry(uniqueId, songName, artistName, length);

if (head == null) {

head = song;

} else {

SongEntry tempNode = head;

while (tempNode.getNextNode() != null) {

tempNode = tempNode.getNextNode();

}

tempNode.insertAfter(song);

}

}

public void removeSong(Scanner scanner) {

System.out.println("REMOVE SONG");

System.out.println("Enter song's unique ID:");

String uniqueId = scanner.nextLine();

SongEntry tempNode1 = head;

SongEntry tempNode2 = head;

while (tempNode1 != null) {

if (tempNode1.getUniqueID().equals(uniqueId)) {

if (tempNode1.getUniqueID().equals(head.getUniqueID())) {

You might be interested in
Which of these can be represented visually by a flowchart?
Mariana [72]

Answer:

i think its C.

if its wrong i'm truly sorry

Explanation:

4 0
2 years ago
Read 2 more answers
When you open a program, the hard drive___
Papessa [141]

Answer:

When you open a program, the hard drive <u>Registers the program and runs the program accordingly. </u>

I hope this helped!

3 0
2 years ago
Universal Containers wants to use a sandbox with real data in it. Which Sandboxes three would you recommend?
laila [671]

Answer:

c. Full Sandbox

d. Partial Sandbox

e. Developer Pro

Explanation:

Universal Containers wants to use a sandbox with real data in it. Which Sandboxes three would you recommend?

a. Test Sandbox

c. Test Sandbox

c. Full Sandbox

d. Partial Sandbox

e. Developer Pro

From the question, we are informed that Universal Containers wants to use a sandbox with real data in it. In this case I will recommend Full Sandbox, Partial Sandbox and Developer Pro.

Sandboxes. In cybersecurity sandbox can be explained as security mechanism that is utilized to separate running programs, and this is an effort utilized to curb system failure as well as software vulnerabilities to disperse.

Sandboxes are crucial when executing suspicious code, it helps to do this so that the host device is is not put to risk of harm. Since, Containers wants to use a sandbox with real data in it then the three types of sandboxes can be use.

✓Full sandboxes allows performance testing as well as staging it can be regarded as copy of production org, and these can be objects attachment and others

✓Partial Copy Sandbox can be allows copying of configuration and part of one's data, in order to allow new configuration testing with one's real data.

5 0
2 years ago
What does the use of color and images on a blog refer to?
serious [3.7K]
I think marketing and branding. i dont think this is 100% correct
8 0
3 years ago
Read 2 more answers
What is the full form of Computer?<br>​
algol13

Answer:

Computer is just made up of hardware and software components.

Explanation:

Sorry if I didn't get your question well

7 0
1 year ago
Other questions:
  • Before starting a spreadsheet, it is smarter to plan ahead and think through the design. true or false
    13·1 answer
  • What happens if you move unencrypted files into an encrypted folder?
    5·1 answer
  • How do i unblock website on my school computer
    7·2 answers
  • Is 5g harmful to the body ?
    9·2 answers
  • 1) Using the density equation d=m/V: What is the density of a piece of metal with a mass o
    10·1 answer
  • Give a detailed example of how an app (that you use regularly)uses parameters. You must state the app's name and function, the p
    7·1 answer
  • Why are Quick Parts useful in an Outlook message?
    5·1 answer
  • Figure out what this says:<br><br> ?driew tib a kool ti seoD
    7·1 answer
  • How to connect two routers wirelessly to extend range.
    15·1 answer
  • The field of ____ is concerned with the technical issues involved in information display. computer science
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!