Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write java doc for Jukebox.java. We don't have to make any changes in the program instead of change to Javadoc import java.util.ArrayList; import java.util.List; public

Write java doc for Jukebox.java. We don't have to make any changes in the program instead of change to Javadoc

import java.util.ArrayList; import java.util.List; public class Jukebox { Database db; int creditCard; public Jukebox(){ } public Jukebox(Database db, int creditCard) { super(); this.db = db; this.creditCard = creditCard; } public Database getDb() { return db; } public void setDb(Database db) { this.db = db; } public int getCreditCard() { return creditCard; } public void setCreditCard(int creditCard) { this.creditCard = creditCard; } public boolean isValidCreditCard(){ if(creditCard>0) return true; else return false; } void play(int i) { Song song=db.getSongList(i); song.play(); } void play() { for (int index=0;index tempSongList= new ArrayList(); tempSongList.add(song1); tempSongList.add(song2); tempSongList.add(song3); Database tempDB= new Database(tempSongList); Jukebox j= new Jukebox(tempDB, -123); //Validation of Credit Card System.out.println("Validity of CC : "+j.isValidCreditCard()); j.getDb().toString(); System.out.println(" Deleting Song @ index 2"); //Deleting Song @ index 2 j.getDb().removeSong(2); j.getDb().toString(); System.out.println("Playing the SongList"); j.play(); System.out.println("Playing Song @ index 2"); j.play(2); } } 

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

Computer Aided Database Design

Authors: Antonio Albano, Valeria De Antonellis, A. Di Leva

1st Edition

0444877355, 978-0444877352

More Books

Students also viewed these Databases questions

Question

What are the challenges associated with tunneling in urban areas?

Answered: 1 week ago

Question

What are the main differences between rigid and flexible pavements?

Answered: 1 week ago

Question

What is the purpose of a retaining wall, and how is it designed?

Answered: 1 week ago

Question

How do you determine the load-bearing capacity of a soil?

Answered: 1 week ago

Question

what is Edward Lemieux effect / Anomeric effect ?

Answered: 1 week ago