In this homework, you will apply many of the concepts covered so far during the semester, including control structures (sequence, selection and repetition), functions, pointers, dynamic memory management, and linear data structures. After completion, you should feel comfortable with allocating memory on the heap to create more complex data structures. Specifically, you will learn how to link different objects in the heap together, to (bi-directionally) traverse through these objects in memory, and to de-allocate all memory previously allocated in the heap.
Objectives:
In this homework, you will create a basic version of the Netflix Movie Queue. The Queue will be implemented as a bi-directional dynamic linked-list (in the Heap). That is, each node in the list must contain links or pointers to the nodes immediately adjacent to it in the list data structure (e.g., pPreviousNode and pNextNode). Your Netflix software shall meet the following requirements:
Welcome to the Netflix Movie Menu!
1. Display Movie Queue
2. Add Movie to Queue
3. Edit Movie in Queue
4. Remove Movie from Queue
5. Search for Movie in Queue
6. Exit Program
Enter option: 1
The movie queue is empty! Please add movies to the queue.
1. Display Movie Queue
2. Add Movie to Queue
3. Edit Movie in Queue
4. Remove Movie from Queue
5. Search for Movie in Queue
6. Exit Program
Enter option: 2
Enter Movie Name: The Wizard of Oz
Enter Year: 1939 Rating:
PG Ranking (1-5): 4
Movie added to the Queue!
1. Display Movie Queue
2. Add Movie to Queue
3. Edit Movie in Queue
4. Remove Movie from Queue
5. Search for Movie in Queue
6. Exit Program
Enter option: 2
Enter Movie Name: Stand by Me
Enter Year: 1986
Rating: R
Ranking (1-5): 5
Movie added to the Queue!
1. Display Movie Queue
2. Add Movie to Queue
3. Edit Movie in Queue
4. Remove Movie from Queue
5. Search for Movie in Queue
6. Exit Program
Enter option: 2
Enter Movie Name: The Croods
Enter Year: 2013
Rating: PG Ranking (1-5): 3
Movie added to the Queue!
1. Display Movie Queue
2. Add Movie to Queue
3. Edit Movie in Queue
4. Remove Movie from Queue
5. Search for Movie in Queue
6. Exit Program
Enter option: 1
Display options:
1. Highest to Lowest Ranking
2. Lowest to Highest Ranking
3. Filter by Rating
4. Sorted movie queue
5. Exit Display Menu
Enter option: 3
Enter Rating: PG
The movies in your Queue with Rating PG are displayed below. ----------------------------
The Wizard of Oz
Year: 1939
Rated: PG
Ranked: ****
----------------------------
The Croods
Year: 2013
Rated: PG
Ranked: ***
----------------------------
Display options:
1. Highest to Lowest Ranking
2. Lowest to Highest Ranking
3. Filter by Rating
4. Sorted movie queue
5. Exit Display Menu
Enter option: 1
The movies in your Queue are displayed below.
----------------------------
Stand by Me
Year: 1986
Rated: R
Ranked: *****
----------------------------
The Wizard of Oz
Year: 1939
Rated: PG
Ranked: ****
----------------------------
The Croods
Year: 2013
Rated: PG
Ranked: ***
----------------------------
Display options:
1. Highest to Lowest Ranking
2. Lowest to Highest Ranking
3. Filter by Rating
4. Sorted movie queue
5. Exit Display Menu
Enter option: 5
Exiting Display Menu.
1. Display Movie Queue
2. Add Movie to Queue
3. Edit Movie in Queue
4. Remove Movie from Queue
5. Search for Movie in Queue
6. Exit Program
Enter option: 4
Enter Movie Name: The Croods
Enter Year: 2013
The Croods has been removed from your queue!
1. Display Movie Queue
2. Add Movie to Queue
3. Edit Movie in Queue
4. Remove Movie from Queue
5. Search for Movie in Queue
6. Exit Program
Enter option: 1
Display options:
1. Highest to Lowest Ranking
2. Lowest to Highest Ranking
3. Filter by Rating
4. Sorted movie queue
5. Exit Display Menu
Enter option: 1
The movies in your Queue are displayed below.
----------------------------
Stand by Me
Year: 1986
Rated: R
Ranked: *****
----------------------------
The Wizard of Oz
Year: 1939
Rated: PG
Ranked: ****
----------------------------
Display options:
1. Highest to Lowest Ranking
2. Lowest to Highest Ranking
3. Filter by Rating
4. Sorted movie queue
5. Exit Display Menu
Enter option: 5
Exiting Display Menu.
1. Display Movie Queue
2. Add Movie to Queue
3. Edit Movie in Queue
4. Remove Movie from Queue
5. Search for Movie in Queue
6. Exit Program
Enter option: 6
Exit Program. Good Bye!