Problem: Implement a part of functionality for the Netflix DVD queue. It's a service that allows a user to create a list of desired movies and then sends DVDs with movies on top of this list to the subscriber one at a a time. A subscriber should be able to create a list of desired movies and manipulate the order in a movie queue in their account. Your program will implement some of the desired functionality by storing the list of movie titles in a linked list. You are provided with the following files available in "Downloadable files" section: MovieList.h contains a class declaration for the class that represents a list of movies. Driver.cpp contains a main function you can use to test your implementation. You will be responsible for providing the MovieList.cpp file, including the implementation of the MovieList member functions (described below): MovieList and ~MovieList: creates an empty list, and deallocates all the nodes in the list, respectively. display(ostream& out) Print movie titles from top to bottom, with positions numbered (put a colon and space between the number and the movie title) one movie per line. Use out << instead of cout <<. count() Returns the number of movie titles in the list addToTop(string title) Add a movie to the top of the list addToBottom(string title) Add a movie to the bottom of the list moveToTop(string title) Move a movie with given title to position 0 (top) remove(int n) Remove a movie at the given position. Return true if successful, false if there is no movie at position n. nextLarger(string title) Returns the move title (string t) that would come next after the title t in alphabetical order. Hint: use the algorithm to find the minimum string in a list, but ignore any movie with title t, and any that come before it in alphabetical order. displaySorted() Use (i.e. call) nextLarger(string) to output the titles in sorted order with positions numbered. Do NOT sort the linked list, it should remain in the same order. Call nextLarger on the empty string to find the first one.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Problem: Implement a part of functionality for the Netflix DVD queue. It's a service that allows a user to create a list of desired movies and then sends DVDs with movies on top of this list to the subscriber one at a a time. A subscriber should be able to create a list of desired movies and manipulate the order in a movie queue in their account. Your program will implement some of the desired functionality by storing the list of movie titles in a linked list. You are provided with the following files available in "Downloadable files" section:

  • MovieList.h contains a class declaration for the class that represents a list of movies.
  • Driver.cpp contains a main function you can use to test your implementation.

You will be responsible for providing the MovieList.cpp file, including the implementation of the MovieList member functions (described below):

  • MovieList and ~MovieList: creates an empty list, and deallocates all the nodes in the list, respectively.
  • display(ostream& out) Print movie titles from top to bottom, with positions numbered (put a colon and space between the number and the movie title) one movie per line. Use out << instead of cout <<.
  • count() Returns the number of movie titles in the list
  • addToTop(string title) Add a movie to the top of the list
  • addToBottom(string title) Add a movie to the bottom of the list
  • moveToTop(string title) Move a movie with given title to position 0 (top)
  • remove(int n) Remove a movie at the given position. Return true if successful, false if there is no movie at position n.
  • nextLarger(string title) Returns the move title (string t) that would come next after the title t in alphabetical order. Hint: use the algorithm to find the minimum string in a list, but ignore any movie with title t, and any that come before it in alphabetical order.
  • displaySorted() Use (i.e. call) nextLarger(string) to output the titles in sorted order with positions numbered. Do NOT sort the linked list, it should remain in the same order. Call nextLarger on the empty string to find the first one.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps with 1 images

Blurred answer
Knowledge Booster
Lists
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education