Seneca BTP 305
Multimedia Management Application
Assignment 3 - 2025In this assignment, you will create an application to manage movies and books. The information about different media items will be loaded in objects from files, and the object will be managed by collection types using STL collections and algorithms.
Compiling and Testing Your Program
All your code should be compiled using this command on matrix:
/usr/local/gcc/10.2.0/bin/g++ -Wall -std=c++17 -g -o asgn file1.cpp file2.cpp ...-Wall: compiler will report all warnings-std=c++17: the code will be compiled using the C++17 standard-g: the executable file will contain debugging symbols, allowing valgrind to create better reports-o asgn: the compiled application will be namedasgn
After compiling and testing your code, run your program as following to check for possible memory leaks (assuming your executable name is asgn):
valgrind --show-error-list=yes --leak-check=full --show-leak-kinds=all --track-origins=yes asgn--show-error-list=yes: show the list of detected errors--leak-check=full: check for all types of memory problems--show-leak-kinds=all: show all types of memory leaks identified (enabled by the previous flag)--track-origins=yes: tracks the origin of uninitialized values (g++must use-gflag for compilation, so the information displayed here is meaningful).
To check the output, use a program that can compare text files. Search online for such a program for your platform, or use diff available on matrix.
Multimedia Management System
In this application you code classes to load from files information about books, movies, and TV shows, create objects with the loaded information and manage those objects using STL containers and algorithms. If something goes wrong during the execution, you will report it to clients using exceptions.
Put all the global variables, global functions/operator overloads, and types inside the seneca namespace and include the necessary guards in each header file.
settings Module
The settings will contain functionality regarding configuration of the application. Design and code a structure named Settings; in the header, declare a global variable of this type named g_settings and define it in the implementation file.
For simplicity reasons, this type will contain only public data-members and no member-functions.
Public Members
m_maxSummaryWidthan integer in 2 bytes that will store the maximum width of text then printing the summary of a media item. By default, the width is 80.m_tableViewas a Boolean attribute; whentrue, print to screen the information about the media items formatted as a table. By default, this attribute isfalse.
mediaItem module (supplied)
This module contains information about a generic multimedia item (a book, movie, or TV show).
Do not modify this module! Study the code supplied and make sure you understand it.
book Module
Design and code a class named Book derived from MediaItem that can store the following information (for each attribute, chose any type that you think is appropriate--you must be able to justify the decisions you have made):
m_author: the author of the booktitle (inherited)
m_country: the country of publicationthe year of publication (inherited)
m_price: the price of the bookthe summary (inherited): a short description of the book
Keep reading this lesson
You've reached the end of the free preview. Unlock the rest of this lesson plus 17 more lessons in Seneca BTP 305.
- Unlimited coding questions
- Unlimited access to all classroom material
- Weekly live call for questions and guidance
- 3,000 AI tutor tokens / month
- Personal SQL database (3 MB)
- Progress tracking
Cancel any time.