The "remove" option should actually remove the node. Use sequence numbering to identify the movie to remove, with the valid range of numbers in the prompt.

computer science

Description

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:

  1. You decide whether to use C or C++ strings, as long as movie titles can be up to 40 characters long.
  2. Do case-independent sorting, but do not convert case of any input.
  3. You decide upon your rating system -- can be any data type.
  4. The "remove" option should actually remove the node. Use sequence numbering to identify the movie to remove, with the valid range of numbers in the prompt.
  5. You decide what to say, if anything, if there's no match for any of the user's input.
  6. Use a linked list to store the movie information, initially empty.


Related Questions in computer science category