CPSC170 Assignment 0

DVD Collection

For this assignment, you are tasked with creating a digital library for your personal DVD Collection. The goal is to keep track of your collection, how much you have spent on them, and who you lent your DVDs to.

Create a file DVD.py. This file will represent a DVD object in your collection. You will need to store the following data within the DVD Object:

Once you have your object written, create a file called DVD_Collection.py. Create a class inside called DVDCollection which has the following functionality:

Think about what methods might be useful to have in your DVD class, to ease writing the above functionality. If you need to add some methods to the DVD class, then do so. You should make sure the following behavior is similar to what you observe:

> python DVDTestProgram.py 
"Matrix," Wachowski Bros.(1999) - $6.51 -> Scotty
"District 9," Neill Blomkamp(2009) - $10.62 -> Dr. Bouchard
"Moon," Duncan Jones(2009) - $15.13 -> Dr. Bouchard
"The Dark Night Rises," Christopher Nolan(2012) - $9.99 -> Dr. Bouchard
"Paranormal Activity," Oren Peli(2007) - $9.15 -> Dr. Shende
$51.4
    

Of course, it would be a pain to have to enter in by hand your entire DVD collection every time you ran the program. Add persistence by including a way to read and write from a file.

Note

This should be fairly straight forward. You did a lot of similar things in lab. The one major difference would be the "remove" and "update" features.

Submission: Submit your code as a zip file on the course Inqiure website by 5PM on Friday, January 25th.

Test Data

Test data for this project consists of two text files. File one should consist of the data you plan on entering into the collection, and the order in which you will be testing your functions. File two should consist of the expected output of your test cases.

Submission: Submit your test data as a zip file on the course Inquire site by 12 PM on Monday, January 21st.

Bonus