C++
Write a C++ program that user is able to choose the function of their wanting from this menu :
Users will be asked to enter the movies they like along with the Genre and one Actor/Actress per movie. the entering process should look like this:
Note that if the user enters yes, the program should start entering the next movie with its properties.
Available movies must be entered as follow:
The program should enter as many available movies as possible (no limits) as long as the user responds Y to the last question.
If the user wants, the program should update (Save) the list of favorite movies for future use. (Save it to a file) - function 3-.
User should be able to request for a suggestion. at this point, the program should suggest 2 movies for movie night along with the reasons for those suggestions. The output should look like:
The code goes here:
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
vector<string>movie,genre,actor,fav_movie,fav_genre,fav_actor,l_movie,l_genre,l_actor;
cout<<"==================================================="<<endl;
cout<<"MAIN MENU - Please choose an
option"<<endl;
cout<<"1. Enter your favourite Movies"<<endl;
cout<<"2. Enter the list of available movies (Movies Night
List)"<<endl;
cout<<"3. Save the list of favourite
movies"<<endl;
cout<<"4. What should i watch?"<<endl;
cin>>n;
int flag=0,flag1=0,len5;
char c='N',d='N';
switch(n)
{
case 1:
while(flag==0 || c=='Y')
{
flag=1;
string s,p,q;
cout<<"Welcome to MovieNight Program!"<<endl;
cout<<"_____________________________"<<endl;
cout<<"OK! let's build your movie database
first"<<endl;
cout<<"I will ask you about movies you liked lately, one at a
time"<<endl;
cout<<"Please Enter the movie name?"<<endl;
cout<<"-->";
fflush(stdout);
fflush(stdin);
getline(cin,s);
movie.push_back(s);
cout<<"Enter the Genre of the movie?"<<endl;
cout<<"-->";
fflush(stdout);
fflush(stdin);
getline(cin,p);
genre.push_back(p);
cout<<"Great! Now please enter the actor in this
movie?"<<endl;
cout<<"-->";
fflush(stdout);
fflush(stdin);
getline(cin,q);
actor.push_back(q);
cout<<"Great! Your movie has been added to the database";
/*cout<<"The entered details
is........"<<endl;
int len=movie.size();
for(int i=0;i<len;i++)
cout<<movie[i]<<" "<<genre[i]<<"
"<<actor[i]<<endl;*/
cout<<"Do you have another movie to enter?(Y for yes, N for
no)"<<endl;
cin>>c;
}
break;
case 2:
while(flag1==0 || d=='Y')
{
flag1=1;
string s1,p1,q1;
cout<<"=============================="<<endl;
cout<<"Ok! Lets check on the movies you have access
to....."<<endl;
cout<<"=============================="<<endl;
cout<<"I will ask you about movies you have access to, one at
a time"<<endl;
cout<<"Please Enter the movie name?"<<endl;
cout<<"-->";
fflush(stdout);
fflush(stdin);
getline(cin,s1);
l_movie.push_back(s1);
cout<<"Enter the Genre of the movie?"<<endl;
cout<<"-->";
fflush(stdout);
fflush(stdin);
getline(cin,p1);
l_genre.push_back(p1);
cout<<"Great! Now please enter the actors/actresses in
this movie?"<<endl;
cout<<"-->";
fflush(stdout);
fflush(stdin);
getline(cin,q1);
l_actor.push_back(q1);
cout<<"Great! Your movie has been added to the comparison list";
/*cout<<"The entered details
is........"<<endl;
int len=movie.size();
for(int i=0;i<len;i++)
cout<<movie[i]<<" "<<genre[i]<<"
"<<actor[i]<<endl;*/
cout<<"Do you have another movie to enter?(Y for yes, N for
no)"<<endl;
cin>>d;
}
break;
case 3:
if(movie.size()==0)
cout<<"Favourite list is not updated still
now"<<endl;
else
{
int len3=movie.size();
for(int z=0;z<len3;z++)
{
fav_movie.push_back(movie[z]);
fav_genre.push_back(genre[z]);
fav_actor.push_back(actor[z]);
}
vector<string>().swap(movie);
vector<string>().swap(genre);
vector<string>().swap(actor);
}
break;
case 4:
cout<<"============================================="<<endl;
len5=fav_movie.size();
for(int i=0;i<len5;i++)
cout<<fav_movie[i]<<" as it is a
"<<fav_genre[i]<<" and it is played by
"<<fav_actor[i]<<endl;
cout<<"Based on the favourite list of yours,you will like
it!"<<endl;
break;
default:
cout<<"wrong case"<<endl;
}
}
The output goes here:
Hope it helps!!!!!!!!!!
Please do comment for further queries....................
C++ Write a C++ program that user is able to choose the function of their wanting from this menu : Users will be asked...
Need help for C program. Thx #include <stdio.h> #include <string.h> #include <ctype.h> // READ BEFORE YOU START: // This homework is built on homework 06. The given program is an updated version of hw06 solution. It begins by displaying a menu to the user // with the add() function from the last homework, as well as some new options: add an actor/actress to a movie, display a list of movies for // an actor/actress, delete all movies, display all movies,...
In C++ write a simple menu program that displays a menu for the user in an object-oriented technique. The menu should keep showing up until the user chooses to quit. Also, there is a sub-menu inside a menu. The user should get at least a line displayed after he or she chooses that particular option meaning if the user presses 1 for the read actors from the file. The output can look like "reading actors from a file" and then...
Need a program in python. Asterix and Obelix want to store and process information about movies they are interested in. So, you have been commissioned to write a program in Python to automate this. Since they are not very computer literate, your program must be easy for them to use. They want to store the information in a comma separated text file. Using this they would need to generate a report – see all items AND show a bar chart...
Please write this program in C++, thanks Task 9.3 Write a complete C++ program to create a music player Your program should read in several album names, each album has up to 5 tracks as well as a genre. First declare genre for the album as an enumeration with at least three entries. Then declare an album structure that has five elements to hold the album name, genre, number of tracks, name of those tracks and track location. You can...
Write a program that performs the following: 1. Presents the user a menu where they choose between: a. Add a new student to the class i. Prompts for first name, last name ii. If assignments already exist, ask user for new student’s scores to assignments b. Assign grades for a new assignment i. If students already exist, prompt user with student name, ask them for score ii. Students created after assignment will need to...
Write a contacts database program that presents the user with a menu that allows the user to select between the following options: (In Java) Save a contact. Search for a contact. Print all contacts out to the screen. Quit If the user selects the first option, the user is prompted to enter a person's name and phone number which will get saved at the end of a file named contacts.txt. If the user selects the second option, the program prompts...
Write python program using IDLE Write a full program that asks the user to enter his/her name then repeatedly ask to enter the temperature in Fahrenheit and convert it to Celsius, the program should then prompt the user if he/she wants to continue or exit the program. The formula for the conversion is: °C = (°F - 32) x 5/9 The program should use a function for the conversion. An Example of a sample run should appear on the screen...
write in python idle Write full program that asks the user to enter his/her name then repeatedly ask to enter the temperature in Fahrenheit and convert it to Celsius, the program should then prompt the user if he/she wants to continue or exit the program. The formula for conversion is: °C = (°F - 32) x 5/9 The program should use a function for the conversion. An Example of a sample run should appear on the screen like the text...
Write a program that asks the user for a student name and asks for grades until the user enters a non-number input, it should then ask if the user wants to enter another student, and keep doing the process until the user stops adding students. The student’s must be stored in a dictionary with their names as the keys and grades in a list. The program should then iterate over the dictionary elements producing the min, max, and mean of...
WONT COMPILE ERROR STRAY / TEXT.H AND CPP PROGRAM SAYING NOT DECLARED HAVE A DRIVER WILL PASTE AT BOTTOM MOVIES.CPP #include "movies.h" #include "Movie.h" Movies *Movies::createMovies(int max) { //dynamically create a new Movies structure Movies *myMovies = new Movies; myMovies->maxMovies = max; myMovies->numMovies = 0; //dynamically create the array that will hold the movies myMovies->moviesArray = new Movie *[max]; return myMovies; } void Movies::resizeMovieArray() { int max = maxMovies * 2; //increase size by 2 //make an array that is...