This project is a C++ program that calculates the cost of a movie production. The program reads a CSV file with the cast of the movie and calculates the cost of the production based on the cast. The program also generates a CSV file with the cast and the cost of the production.
The project does the following:
- Reads a CSV file with the cast of the movie
- Generates random names for extra cast members
- Uses object-oriented programming to store the cast, the cost of the production and the cost of each cast member. The cast is stored in a vector of objects of the class CastMember.
- Calculates the cost of the production based on the cast, transport, hotel, food, drinks, makeup, etc.
- Generates a CSV file with the cast and the cost of the production
The data used in this project is taken from IMBD. The data is stored in a CSV file. The raw data was modified to fit the needs of the program. The data is stored in the following format:
- The first line is the header of the CSV file
- The first column is the name of the cast member
- The second column is the function of the cast member
- The class CastMember is used to store the cast members. The class has the following attributes:
nume
- stringfunctie
- stringclasa
- stringdieta
- string
- The class CastMember has the following methods:
getNume()
- returns the name of the cast membergetFunctie()
- returns the function of the cast membergetClasa()
- returns the class of the cast membergetDieta()
- returns the diet of the cast membersetNume(string nume)
- sets the name of the cast membersetFunctie(string functie)
- sets the function of the cast member
- The class Cost is used to store the cost of the production. The class has the following attributes:
costTransport
- doublecostHotel
- doublecostBautura
- doublecostMachiaj
- doublecostDieta
- doublecostFilmari
- doublecostTotal
- double
- FileProcessor class is used to read and write data from and to files. The class has the following attributes:
cast
- vectorcost
- Cost
- The class
FileProcessor
has the following methods:readCastFile(string filename)
- reads the cast from the CSV filewriteFinalCastFile(string filename)
- writes the cast and the cost of the production to a CSV filewriteMenuFile(string filename)
- writes the menu to a CSV filewriteCostFile(string filename)
- writes the cost of the production to a CSV filegetCast()
- returns the castgetCost()
- returns the cost of the production
The program generates a CSV file with the cast and the cost of the production