here is your program : --------->>>>>>>>>>>
KaraokeConsole.h : ------->>>
#ifndef KARAOKECONSOLE_CLASS_
#define KARAOKECONSOLE_CLASS_
#include<iostream>
using namespace std;
const int MAX_SONG_TITLES = 10;
const int MAX_SIZE = 15;
class KaraokeConsole{
private:
bool on_state;
string titles[MAX_SONG_TITLES];
int size;
int current;
char button_name[MAX_SIZE];
public:
KaraokeConsole();
void onOffPressed();
void nextPressed();
void backPressed();
void playPressed();
void addPressed(string);
bool isOn();
void display();
};
#endif
KaraokeConsole.cpp : -------->>>>>>>>>
#include "KaraokeConsole.h"
#include<cstring>
KaraokeConsole::KaraokeConsole(){
on_state = false;
size = 0;
current = -1;
strcpy(button_name," ");
for(int i = 0;i<MAX_SONG_TITLES;i++){
titles[i] = " ";
}
}
void KaraokeConsole::backPressed(){
strcpy(button_name,"Back");
if(current <= 0){
return;
}
current--;
}
void KaraokeConsole::nextPressed(){
strcpy(button_name,"Next");
if(current >= size-1){
return;
}
current++;
}
void KaraokeConsole::onOffPressed(){
strcpy(button_name,"On/Off");
on_state = !on_state;
}
void KaraokeConsole::playPressed(){
strcpy(button_name,"Play");
if(on_state){
display();
}
}
void KaraokeConsole::addPressed(string title){
strcpy(button_name,"Add");
if(size >= MAX_SONG_TITLES){
return;
}
titles[size++] = title;
}
void KaraokeConsole::display(){
cout<<"\nNumber of song titles in the playlist:
"<<size;
cout<<" - "<<button_name<<" Button
Pressed";
switch(button_name[0]){
case 'A':
{
cout<<"\nA song title is added
";break;
}
case 'N':
{
cout<<"\nSong
"<<(current+1)<<" is Ready.";break;
}
case 'B':
{
cout<<"\nSong
"<<(current+1)<<" is Ready.";break;
}
case 'P':
{
cout<<"\n"<<(current+1)<<".
"<<titles[current];break;
}
case 'O':
{
if(on_state){
cout<<"\nConsole is On";
}else{
cout<<"\nConsole is Off";
}
}
}
}
int main(){
KaraokeConsole st;
st.addPressed("Rakhi");
st.display();
st.addPressed("lonawala");
st.addPressed("deepika");
st.nextPressed();
st.nextPressed();
st.display();
st.playPressed();
st.display();
st.onOffPressed();
st.playPressed();
st.display();
st.backPressed();
st.display();
}
In this assignment, you will implement a class named KaraokeConsole which mimics the console of a...
Ch 8 Program: Playlist (Java)You will be building a linked list. Make sure to keep track of both the head and tail nodes.(1) Create two files to submit.SongEntry.java - Class declarationPlaylist.java - Contains main() methodBuild the SongEntry class per the following specifications. Note: Some methods can initially be method stubs (empty methods), to be completed in later steps.Private fieldsString uniqueID - Initialized to "none" in default constructorstring songName - Initialized to "none" in default constructorstring artistName - Initialized to "none"...
cpp Lab Quiz 2 Time Slot: Mon 1-2 PM Deadline: 05/13/2019 2:00 PM Submission: Email Subject: CSC 102 CC3/CC4 LabQuiz 2TS 2 FileType: cpp Write a program to define a music player. Music player has these features: isPlaying, isStopped, currentSongTitle, nextSong Title, currentSongLength. Programmer can play or stop a song. You can also choose to skip to the next song. Songs are stored in array of strings. When you choose to move to the next song, currentSong Title and nextSongTitle...
Introduction In this final programming exercise, you'll get a chance to put together many of the techniques used during this semester while incorporating OOP techniques to develop a simple song playlist class. This playlist class allows a user to add, remove and display songs in a playlist. The Base Class, Derived Class and Test Client Unlike the other PAs you completed in zyLabs, for this PA you will be creating THREE Java files in IntelliJ to submit. You will need...
Objectives: (You must use loop structures to get credit for this assignment) Students in Norfolk Gardens Academy are very excited about the end of year school party. Victoria is playing piano. She is practicing for the end of the school year party every day for a certain amount of time depending on her schedule. It takes her N minutes to practice the first song, and each of following songs takes M minutes longer than the previous song. She has T...
Many of us have large digital music collections that are not always very well organized. It would be nice to have a program that would manipulate our music collection based on attributes such as artist, album title, song title, genre, song length, number times played, and rating. For this assignment you will write a basic digital music manager (DMM). Your DMM program must have a text-based interface which allows the user to select from a main menu of options including:...
Problem: Coffee(Java) Design and implement a program that manages coffees. First, implement an abstract class named Coffee. The Coffee class has three member variables: coffee type(does not mention the data type of the variable coffeeType), price, and store name. The Coffee class has an abstract method name ingredient. Make sure to add all necessary setters and getters as well as other methods. The class Coffee implements an interface HowToMakeDrink. The interface has the following method: public interface HowToMakeDrink { public...
Introduction Welcome to Rad.io, you've been hired to work on our music streaming app, think of it as Spotify only more rad! You're in charge of handling our customer’s song list. When a user selects a playlist it will load into the list a number of songs. Users can skip to the next song, move to the previous, they can select a song to play next or select a song to add to the end of their list. Objective You...
Java: student directory GUI You need to implement three classes: Person Student StudentDirectory StudentMain Start by implementing Person and Student classes. Once you are sure you can serialize and deserialize and ArrayList of Students to and from a file, move on to building the GUI application. Person: The Person class should implement serializable interface. It contains the following: Person's first name (String) Person's last name (String) Person's id number Person's date of birth (Date) public String toString(): This method method...
Please Read it all and carefully In visual basic(vba)do the following program Summary INGE Industry, Inc. needs a program in which the date and temperature in Celsius degrees of an industry laboratory are recorded and stored in a sequential file. In addition, you can see the recorded data and convert the temperatures in the following units: Fahrenheit, Kelvin and Rankine. In addition, they want to see a linear graph that reflects how the temperature has fluctuated day by day, for...
This task is a program framework that you should complete. The program should allow the user to move a circular figure with the mouse over a drawing area. The current position of the figure is displayed continuously: Given is the main program: import javafx.scene.Scene; import javafx.application.Application; import javafx.beans.value.*; import javafx.scene.*; import javafx.scene.paint.Color; import javafx.scene.text.Text; import javafx.stage.Stage; public class Main extends Application { private DraggableCircle dc; private Text text; private void updateText() { text.setText("("+dc.getCenterX()+", "+dc.getCenterY()+")"); } @Override public void start(final Stage...