Lab Assignment 6: Linked Lists
Objectives:
·
Using linked list to store information
·
Sorting data in linked list
·
Handle input errors and invalid values
·
Design and create a well-structure program using C++ basic
programming constructs
Description:
Write a menu-driven
program to keep track of your favorite movies:
MENU
A Add a movie
U Update a movie
E rEmove a movie
L List all movies
T arrange by Title
V arrange by year Viewed
R arrange by Rating
Q Quit
...your choice: a[ENTER]
Enter a movie's name: Star Wars[ENTER]
Enter the year you saw Star Wars [like 2016]: 1977[ENTER]
Enter your rating for Star Wars [1, 2, 3, 4, 5]: 1[ENTER]
MENU
A Add a movie
U Update a movie
E rEmove a movie
L List all movies
T arrange by Title
V arrange by year Viewed
R arrange by Rating
Q Quit
...your choice: a[ENTER]
Enter a movies' name: Mission Impossible[ENTER]
Enter the year you saw Mission Impossible [like 2016]: 2015[ENTER]
Enter your rating for Mission Impossible [1, 2, 3, 4, 5]: 2[ENTER]
MENU
A Add a movie
U Update a movie
E rEmove a movie
L List all movies
T arrange by Title
V arrange by year Viewed
R arrange by Rating
Q Quit
...your choice: L[ENTER]
# Title Viewed Rating
-- --------------------------- ------ ------
1 Mission Impossible 2015
2
2 Star Wars 2016 1
MENU
A Add a movie
U Update a movie
E rEmove a movie
L List all movies
T arrange by Title
V arrange by year Viewed
R arrange by Rating
Q Quit
...your choice: q[ENTER]
Use sequence numbers for the "remove"
and "update" options, like this:
# Title Viewed Rating
-- --------------------------- ------
------
1 Mission Impossible 2015 2
2 Star Wars 2016 1
MENU
A Add a movie
U Update a movie
E rEmove a movie
L List all movies
T arrange by Title
V arrange by year Viewed
R arrange by Rating
Q Quit
...your choice: E[ENTER]
...which
movie to remove (1-2)? 2[ENTER]
Requirements:
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
27 | 28 | 29 | 30 | 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |