To the attached music management system www ww program in the text; www www -Add a function that will allow us to add the prices of music; www w m www w ww ww m m -Add a function that will give the total price of the music the user bought.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

#include<bits/stdc++.h>
using namespace std;

// Class representing music data
class Song {
public:
string musicName, musicDescription;
};

// Function to take input for music description
Song addDescription()
{
Song s1;
cout<<"Enter the Music name : ";
cin>>s1.musicName;
cout<<"Enter the Music description : ";
cin>>s1.musicDescription;
return s1;
}

// Function to write music object details into a txt file
void storeInfoToDatabase(Song s){
ofstream fileObject;

// Opening the file in append mode
fileObject.open("Database.txt", ios::app);
fileObject << s.musicName;
fileObject << " ";
fileObject << s.musicDescription;
fileObject << "\n";
}

// Driver Function
int main(){
Song s = addDescription();
storeInfoToDatabase(s);
cout<<"Data written into file succesfully...";

return 0;
}

To the attached music management system
ww ww w w
w mm w
program in the text;
-Add a function that will allow us to add the prices
www
ww ww m w m
of music;
-Add a function that will give the total price of the
music the user bought.
www ww
Transcribed Image Text:To the attached music management system ww ww w w w mm w program in the text; -Add a function that will allow us to add the prices www ww ww m w m of music; -Add a function that will give the total price of the music the user bought. www ww
Expert Solution
steps

Step by step

Solved in 2 steps with 4 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY