*NOTE*: YOUR ANSWERS DO NOT NEED TO BE TESTED WITHIN A CODING PROGRAM AND CHECKED FOR ERRORS OR BE 100% ACCURATE, JUST AS LONG AS THEY MAKE SENSE AND IT’S CLEAR WHAT YOU ARE TRYING TO SHOW. IT SHOULD TAKE NO LONGER THAN 45 MINUTES TO COMPLETE.
Currently on the market you can buy digital photo frames. These digital photo frames can potentially store up to a thousand photos. A digital photo frame can display the photos in order that they were added or they can be displayed in a random sequence. The photos also include date and time stamps which can display when the photo was taken. Photos can also be removed by the user from the digital photo frame, which means the next photo in order will be shown.
a) Which underlying data structure (array or linkedâ€list) will you use as a basis to model the digital photo frame database? In twoâ€“three sentences, justify your answer.
b) Which kind of abstract data type (binary tree, general tree, array, stack, priority queue, doubleâ€ended queue, set, list, etc.) would you use to model the digital photo frame database? In twoâ€“three sentences, justify your answer.
c) Provide a type definition using struct(s) and pointers for the contents of a digital photo frame. You can come up with your own type(s) and name them whatever you like).
d) Given your definition for a digital photo frame in part (c) above:
i) Define the type (photo_frame_db) that represents the digital photo frame database based upon your answers in part (a) above.
ii) Implement the functions that allow manipulation of the photo frame database given your answers above. You should include the following functions (you can come up with your own headers):
– A function that creates a photo that includes date and time stamps.
– A function that creates the (empty) database;
– A function that adds and deletes photos from the digital photo frame database.
– A function that displays the photos in order.
– A function that displays the photos randomly.