Changes

m
format
Line 39: Line 39:  
//Precondition:ReadAllMovies() must be called.
 
//Precondition:ReadAllMovies() must be called.
 
//Postcondition:1.True is returned if one movie was taken from the data file and entered into the list.
 
//Postcondition:1.True is returned if one movie was taken from the data file and entered into the list.
// 2.False is returned if the EndOfFile flag was reached.
+
// 2.False is returned if the EndOfFile flag was reached.
 
void Display(ostream&os = cout) const;
 
void Display(ostream&os = cout) const;
 
//Purpose:Displays one movie from the list.
 
//Purpose:Displays one movie from the list.
Line 147: Line 147:  
//Postcondition:The list is displayed to the console.
 
//Postcondition:The list is displayed to the console.
 
void Search(const MovieListItemType& itemToSearch, bool& success);
 
void Search(const MovieListItemType& itemToSearch, bool& success);
//Purpose:To search through the list for the correct movie
+
//Purpose:To search through the list for the correct movie.
 
//Precondition:Search called from the menu.
 
//Precondition:Search called from the menu.
 
//Postcondition:1.If the movie is found the index where it was found is returned.
 
//Postcondition:1.If the movie is found the index where it was found is returned.
// 2.If the movie is not found the user will be notified.
+
// 2.If the movie is not found the user will be notified.
 
 
 
private:
 
private:
Line 264: Line 264:  
if(itemToSearch.CompareKeys(items[i]) == 0)
 
if(itemToSearch.CompareKeys(items[i]) == 0)
 
{
 
{
cout<<endl<<"The Movie has been found at index "<<i<<"."<<endl;//add ...
+
cout<<endl<<"The Movie has been found at index "<<i<<"."<<endl;
 
items[i].Display();
 
items[i].Display();
 
break; //If the movie is found, go no further.
 
break; //If the movie is found, go no further.
Line 272: Line 272:  
{
 
{
 
cout<<endl<<"The movie you wished to search for has not been found."<<endl;
 
cout<<endl<<"The movie you wished to search for has not been found."<<endl;
break; //If you have gone past the point
+
break; //If you have gone past the point where the movie should be stored
  //where the movie should be stored in the list, go no further.
+
      //in the list, go no further.
 
}
 
}
 
}
 
}
123

edits