Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Assignment 2 You are the software developer put in charge of helping an online s

ID: 665400 • Letter: A

Question

Assignment 2

You are the software developer put in charge of helping an online streaming website to categorize its film collection. The company already has an existing collection of American films, but it wants to branch out into foreign films. While the company plans to have foreign films from many countries it plans to especially expand into Bollywood films. These films are from India and are primarily in Hindi, but they sometimes also have other secondary languages that are spoken in the films. Most Bollywood films are also musicals.

Once you take a look at their software you realize that they have not used object-oriented programming. The software they have is very difficult to reuse and update. You decide that you will have to create a new design for the software and start completely from scratch.

The development of this project must be done using object-oriented programming. All films should contain name of the film, name of the director, and year of release. All foreign films are films but also have language the film is in, subtitle information, and translation of the film name into English. There can be more than one subtitle for a movie (imagine a film in French that has English and Spanish subtitles). There can also be more than one director of a film. Bollywood films are foreign films that have songs and may have secondary languages as well.

There should ways to access and mutate all the information stored. Inheritance must be used to accomplish this assignment. There should be a parent class for films and a class which inherits from that class and represents foreign films and class that represents Bollywood films which inherits from foreign films.

In addition to the requirements above, each film class must override the toString method inherited from the Object class. The overridden definition of each toString method should return all the information stored about that specific film. The parent class for films must also override the equals method inherited from the Object class. This method should determine whether two films are the same. If they are the same it should return true otherwise return false.

Finally, demonstrate a prototype of this program by allowing the user to either create up to ten films (an array of films). Provide the user with a menu of options to create a film, foreign film, or Bollywood film. Once a film is created it should be stored so that it can be accessed
again. There should be an option to display all the information for all films entered so far. Use the toString method to display the information for each film. After a user enters a film use the equals method in the film class to make sure that film has not already been entered into the system. If it has tell the user that film already exists in the system and do not store it again. If it has not been entered then insert it into the system.

You may use any films to test your system, but make sure to include at least one film, one foreign film, and one Bollywood film, and at least five films. If you are not familiar with films or foreign films or Bollywood films a list is provided below so that you use these films to test your program.

Film

Name of Film: The Matrix
Name of Director(s): Andy Wachowski, Lana Wachowski Year of Release: 1999

Foreign Film

Name: Densha Otoko
Name of Director(s): Shosuke Murakami Year of Release: 2005

Language: Japanese
Subtitle Information: English Translation: Train Man

Bollywood Film

Name of Film: Veer-Zaara
Name of Director(s): Yash Chopra Year of Release: 2004

Language: Hindi
Secondary Language (if any): Urdu, Punjabi
Subtitle Information: English, Arabic, Tamil, Telugu Translation: Veer-Zaara

Songs:
1) "Tere Liye"
2) "Main Yahan Hoon"
3) "Aisa Des Hai Mera"
4) "Yeh Hum Aa Gaye Hain Kahan" 5) "Do Pal"
6) "Kyon Hawa"
7) "Hum To Bhai Jaise"
8) "Aaya Tere Dar Par"
9) "Lodi"
10) "Tum Paas Aa Raahein Ho"
11) "Jaane Kyon"

Bollywood Film

Name of Film: Pyaasa
Name of Director(s): Guru Dutt Year of Release: 1957

Language: Hindi
Secondary Language (if any): none Subtitle Information: English Translation: Thirsty

Songs:
1) "Aaj Sajan Mohe Ang Lagalo"
2) "Ham Aapki Aankhon Me"
3) "Jaane Kya Tune Kahi"
4) "Jane Woh Kaise Log"
5) "Sar Jo Tera Chakraye"
6) "Yeh Duniya Agar Mil Bhi Jaaye Toh Kya Hai"
7) "Ye Hanste Huye Phool"
8) "Jinhen Naaz Hai Hind Par"
9) "Tang Aa Chuke Hain Kashm-e-Kashe Zindagi Se"

Bollywood Film

Name of Film: 3 Idiots
Name of Director(s): Rajkumar Hirani Year of Release: 2009

Language: Hindi
Secondary Language (if any): Urdu, English Subtitle Information: English, French, Spanish Translation: 3 Idiots

Songs:
1) "Aal Izz Well"
2) "Zoobi Doobi"
3) "Behti Hawa Sa Tha Woh" 4) "Give Me Some Sunshine" 5) "Jaane Nahin Denge Tujhe" 6) "Zoobi Doobi - Remix"
7) "Aal Izz Well - Remix"

Explanation / Answer

#include <iostream.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>


class Films
{
   public:
   char FilmName[60], DirectorNames[90];
   int ReleaseYear;
   char Language[60], Subtitles[90];
   char EnglishedName[60], Songs[320];
   char AdditionalLanguages[120];

   void disp(){
       cout << endl << "FilmName: " << FilmName;
       cout << endl << "Director(s) Name(s): " << DirectorNames ;
       cout << "Year Released: " << ReleaseYear;
       cout << Language << Subtitles << EnglishedName ;
       cout << endl << Songs << endl << AdditionalLanguages;
       }
   Films();
   Films(char fn[60], char dn[90], int yr, char lng[60], char st[90], char EN[90], char Sg[320], char AL[120]);

};

Films::Films()
{
   strcpy(FilmName,"Babhi");   strcpy(DirectorNames , "Salman Khan");
   ReleaseYear = 1975;
   strcpy(Language, " Hindhi"); strcpy(Subtitles, "English, Spanish");
   strcpy( EnglishedName , "Bhabhi The Lady"); strcpy(Songs , "5 Songs");
   strcpy( AdditionalLanguages, "Urdu, Tamil");

}

Films::Films(char fn[60], char dn[90], int yr, char lng[60], char st[90], char EN[90], char sg[320], char AL[120])
{

   strcpy(FilmName,fn);   strcpy(DirectorNames , dn);
   ReleaseYear = yr;
   strcpy(Language, lng); strcpy(Subtitles, st);
   strcpy( EnglishedName , EN); strcpy(Songs , sg);
   strcpy( AdditionalLanguages, AL);


}

//ref class overRide1 {
//public:
//virtual String^ ToString() override {
//return "overriding toString";
//}
//};


class ForeignFilms: public Films
{

};

class BollyWoodFilms: public ForeignFilms
{

};

void main()
{
int i,j,k;

//BollyWoodFilms bwf1("hai","dsf", 1975, "sdjf","dsf", "werfds", "sdfds", "dsfds");
Films flm1("MynaePiyarKiya","Sharuk Khan", 1995, "Hindhi","English, French, Spanish", "FamilyDeal", "1. Piyar Piyar, 2. Dil Se 3. Kuch na kaho 4. Kuch be na kaho", "Greek, Latin");
//Films flm1 = new Films("hai","dsf", 1975, "sdjf","dsf", "werfds", "sdfds", "dsfds");

Films flm2[10];
for ( i = 1; i<=10; i++)
      {   cout << " Film Info " << i << ": " ; flm2[i].disp(); }

//bwf1.disp();
flm1.disp();
int filmNum;
   cout << " Choose from the Menu of options please:";
   cout << " 1 English Film 2 Foreign Film 3 BollyWood Film ";
   cin >> filmNum;

}