For your Mid-Term Exam, you will be creating a Menu-Driven application to keep track of a home "library". The library will include books, videos, and music (at a minimum - you may have other things...

1 answer below »

Need a C++ file ASAP. Please see the following attachment.




For your Mid-Term Exam, you will be creating a Menu-Driven application to keep track of a home "library".  The library will include books, videos, and music (at a minimum - you may have other things you want to keep track of).  Each of these may have different/multiple media options, such as Hardback, Paperback (may be further broken into Trade, Mass Market, Comic?), eBook, Blu-Ray, DVD, MP4, MP3, CD, etc... You might have the same Title as Hardback, Paperback, and eBook (I have some of these).  You may have the item additionally as a movie or a soundtrack, so you may have multiple "copies" of the same title.   Some items may be parts of series or even sub-series. Star Trek for example, you have the original TV show and Movies, Next Gen TV show & movies, New Timeline Movies, all the Spin-off shows (Voyager, etc), and even books. Another example is Star Wars - you have 9 movies in the main story, plus the side-stories.  Each "trilogy" of movies is it's own sub-series. Again, there are books in the series. Music comes in albums, singles, and other options.  You may wind up with the same song multiple times. Each item may belong to multiple genres.  There may also be multiple authors, actors, artists.
Answered Same DayMar 30, 2021

Answer To: For your Mid-Term Exam, you will be creating a Menu-Driven application to keep track of a home...

Aditya answered on Mar 30 2021
155 Votes
#include
#include
using namespace std;
class book
{
private :
string book_name;
string book[100];
string author_name;
string author[100];
string publisher_name;
string publisher[100];
int year_of_print;
int year[100];
int choice;
int repeat =1;
int count =0;
public :
void findauthor()
{
int author_book_occurence = 0;
cout<<"Enter the author for which Book is needed"< cin>>author_name;
cout<<"Book belongings To This Author Are: "< for(int i =0;i {
if(author[i] == author_name)
{
cout<<"Book Name "< author_book_occurence ++;
}
}
if(author_book_occurence > 0)
{
cout<<"Number of Books Present for Author are"< }
else
{
cout<<"No Book Are Present for this Author "< }
}
void findpublisher()
{
int publisher_book_occurence = 0;
cout<<"Enter the Publisher for which Book is needed"< cin>>publisher_name;
cout<<"Book belongings To Publisher "< for(int i =0;i {
if(publisher[i] == publisher_name)
{
cout<<"Book Name "< publisher_book_occurence ++;
}
}
if(publisher_book_occurence > 0)
{
cout<<"Number of Books Present for Publisher are: "< }
else
{
cout<<"No Book Are Present for this Publisher "< }
}
void findyear()
{
int year_book_occurence = 0;
cout<<"Enter the Year for which Book is needed"< cin>>year_of_print;
cout<<"Book belongings To This Year Are: "< for(int i =0;i {
if(year[i] == year_of_print)
{
cout<<"Book Name "< year_book_occurence ++;
}
}
if(year_book_occurence > 0)
{
cout<<"Number of Books Present for this Year "< }
else
{
cout<<"No Book Are Present for this Year "< }
}
void add()
{
cout<<"Enter the book Name"< cin>>book[count];
cout<<"Enter the Author Name"< cin>>author[count];
cout<<"Enter the Publisher Name"< cin>>publisher[count];
cout<<"Enter the Year Of Publication "< cin>>year[count];
cout<<"Book Have Been Added"< }
void display()
{
cout<<"All the Book Present in the library are"< for(int i =0;i {
cout<<"Book Name: "< }
}
void startmenu()
{
cout<<"Welcome to the Books Part of the Library"< cout<<"Here You Can Find The Book By Multiple Options"< do
{
cout<<"To Find By Author Name Press 1"< cout<<"To Find By Publisher Name Press 2"< cout<<"To Find By Year Of Publication Press 3"< cout<<"To View All Books With All the Details Press 4"< cout<<"To Add A Book Press 5"< cout<<"To Exit The Book Menu Press 6"< cin>>choice;
switch(choice)
{
case 1:
{
findauthor();
break;
}
case 2:
{
findpublisher();
break;
}
case 3:
{
findyear();
break;
}
case 4:
{
display();
break;
}
case 5:
{
add();
break;
}
case 6:
{
exit(0);
}
default :
{
cout<<"You have entered wrong option"< break;
}
}
cout<<"To Try Again for Book Press 1 or Press any other key to Exit"< cin>>repeat;
count ++;
}while(repeat == 1);
exit(0);
}
};
class Music
{
private :
string sname[100];
string singer_name;
string singer[100];
string composer_name;
string composer[100];
string writer_name;
string writer[100];
int year_of_relase;
int year[100];
int choice;
int repeat =1;
int count =0;
public :
void findsinger()
{
int occurence = 0;
cout<<"Enter the Singer Name for which Song is needed"< cin>>singer_name;
cout<<"Songs Released By Singer "< for(int i =0;i {
if(singer[i] == singer_name)
{
cout<<"Song Name: "< occurence ++;
}
}
if(occurence > 0)
{
cout<<"Number of Song released by singer are: "< }
else
{
cout<<"No Song Are Present of this Singer "< }
}
void findcomposer()
{
int occurence = 0;
cout<<"Enter the Composer Name for which Song is needed"< cin>>composer_name;
cout<<"Songs Released By Composer are :"< for(int i =0;i {
if(composer[i] == composer_name)
{
cout<<"Song Name: "< occurence ++;
}
}
if(occurence > 0)
{
cout<<"Number of Song released by Composer are "< }
else
{
cout<<"No Song Are Present of this Composer "< }
}
void findwriter()
{
int occurence = 0;
cout<<"Enter the Writer Name for which Song is needed"< cin>>writer_name;
cout<<"Songs Released By Writer "< for(int i =0;i {
if(writer[i] == writer_name)
{
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here