String and objects in c++

 String and objects in c++


       

#include<iostream>

#include<string>

using namespace std;

class Pk_Songs {

private:

	string Name[10];

public:

	void setname(){

		const int size = 5;

		Pk_Songs a[size];

		a[0].Name[0] = "Yeh mumkin to nhi"; a[0].Name[1] = "Saiyan"; a[0].Name[2] = "Aye dil tu bata"; a[0].Name[3] = "Mohobat tujhe alvida"; a[0].Name[4] = "Bharosa"; a[0].Name[5] = "Tu kya jaany"; a[0].Name[6] = "Kaheen deep jale"; a[0].Name[7] = "Tum se he taluq hai"; a[0].Name[8] = "Deewangi"; a[0].Name[9] = "Kahan jaye ye dil";

		a[1].Name[0] = "Billo"; a[1].Name[1] = "Chamkeeli"; a[1].Name[2] = "Preeto"; a[1].Name[3] = "Nachaan main odey naal"; a[1].Name[4] = "Ballay ballay"; a[1].Name[5] = "Mela wekhan aiyan kudiyan Lahore diyan"; a[1].Name[6] = "Nach punjaban"; a[1].Name[7] = "Teri gal karni"; a[1].Name[8] = "Aithey rakh"; a[1].Name[9] = "Diamond ring";

		a[2].Name[0] = "Bijli"; a[2].Name[1] = "Baazi"; a[2].Name[2] = "Aye zindagi"; a[2].Name[3] = "Teriyan"; a[2].Name[4] = "Kalabaaz Dil"; a[2].Name[5] = "Banware"; a[2].Name[6] = "Sadqa"; a[2].Name[7] = "Balma Baghora"; a[2].Name[8] = "Do bol"; a[2].Name[9] = "Item number";

		a[3].Name[0] = "Tera Who Pyaar"; a[3].Name[1] = "Aaya na tu"; a[3].Name[2] = "Baari"; a[3].Name[3] = "Uchiyan Deewaran-Baari 2"; a[3].Name[4] = "Mahi Aja"; a[3].Name[5] = "Jee Liya"; a[3].Name[6] = "Yaariyan"; a[3].Name[7] = "Hamesha"; a[3].Name[8] = "Awari"; a[3].Name[9] = "Roye roye";

		a[4].Name[0] = "Allay"; a[4].Name[1] = "Laila o Laila"; a[4].Name[2] = "Ve mahiya"; a[4].Name[3] = "Chano"; a[4].Name[4] = "Sun re sajania"; a[4].Name[5] = "Rangeen"; a[4].Name[6] = "Dekha"; a[4].Name[7] = "Chal dil mere"; a[4].Name[8] = "Mela loot liya"; a[4].Name[9] = "Ab khel jamay ga";

		get(a, size);

}

	void get(Pk_Songs *a,const int size)const{

		for (int j = 0; j < size; j++){

			for (int i = 0; i < size; i++){

				cout << a[j].Name[i] << "\n";

			}

		}

	}

};

class Bolly_Songs {

private:

	int id[10];

	string Name[10];

	string singer_N[5];

public:

	void setname() {

		const int size = 5;

		Bolly_Songs a[size];

		a[0].Name[0] = "Channa Merya"; a[0].Name[1] = "Raabta"; a[0].Name[2] = "Sanam Re"; a[0].Name[3] = "Tera yaar hoon main"; a[0].Name[4] = "Khuda Hafiz"; a[0].Name[5] = "Khairiyat"; a[0].Name[6] = "Teri meri kahani"; a[0].Name[7] = "Roke na ruke Naina"; a[0].Name[8] = "Humdard"; a[0].Name[9] = "Bekhayali";

		a[1].Name[0] = "Sab tera"; a[1].Name[1] = "Main rahoon ya na rahoon"; a[1].Name[2] = "Kaun tujhe"; a[1].Name[3] = "Jab tak"; a[1].Name[4] = "Bol do na zara"; a[1].Name[5] = "Waja tum ho"; a[1].Name[6] = "Naina"; a[1].Name[7] = "Kuch to hai"; a[1].Name[8] = "Dil mein ho tum"; a[1].Name[9] = "Chale aana";

		a[2].Name[0] = "Dil diyan gallan"; a[2].Name[1] = "Tu jaane na"; a[2].Name[2] = "Woh lamhe who baaten"; a[2].Name[3] = "Pehli dafa"; a[2].Name[4] = "Main rang sharbaton ka"; a[2].Name[5] = "Tera hua"; a[2].Name[6] = "Khair mangda"; a[2].Name[7] = "Musafir"; a[2].Name[8] = "Tu chahiye"; a[2].Name[9] = "Paaniyon sa";

		a[3].Name[0] = "Deewani mastani"; a[3].Name[1] = "Teri ore"; a[3].Name[2] = "Saans"; a[3].Name[3] = "Sunn rha hai"; a[3].Name[4] = "Teri meri"; a[3].Name[5] = "Hangover"; a[3].Name[6] = "Zoobi doobi"; a[3].Name[7] = "Radha"; a[3].Name[8] = "Tere bin"; a[3].Name[9] = "Manwaa laage";

		a[4].Name[0] = "Jag ghoomeya"; a[4].Name[1] = "Main tenu"; a[4].Name[2] = "Tumhe dillagi"; a[4].Name[3] = "Teri meri"; a[4].Name[4] = "Piya o re piya"; a[4].Name[5] = "Surili akhiyon wale"; a[4].Name[6] = "Zaroori tha"; a[4].Name[7] = "Tum jo aaye"; a[4].Name[8] = "Afreen afreen"; a[4].Name[9] = "Mere rashke Qamar";

		get(a, size);

	}

	void get(Bolly_Songs *N,const int size)const{

		for (int i = 0; i < size; i++)

		{

			for (int j = 0; j < size; j++)

			{

				cout << N[i].Name[j] << "\n";

			}

		}

	}

};

class Holly_Songs {

private:

	string Name[10];

public:

	void setname()

	{

		const int size = 5;

		Holly_Songs a[size];

		a[0].Name[0] = "On my way"; a[0].Name[1] = "Faded"; a[0].Name[2] = "Alone"; a[0].Name[3] = "Diamond heart"; a[0].Name[4] = "Lily"; a[0].Name[5] = "Dark side"; a[0].Name[6] = "Sing me to sleep"; a[0].Name[7] = "The spectre"; a[0].Name[8] = "Lost control"; a[0].Name[9] = "All falls down";

		a[1].Name[0] = "Shape of you"; a[1].Name[1] = "I don’t care"; a[1].Name[2] = "Perfect"; a[1].Name[3] = "Beautiful people"; a[1].Name[4] = "Antisocial"; a[1].Name[5] = "Galway girl"; a[1].Name[6] = "River"; a[1].Name[7] = "Drunk"; a[1].Name[8] = "Blow"; a[1].Name[9] = "All of the stars";

		a[2].Name[0] = "Blank space"; a[2].Name[1] = "Look what you made me do"; a[2].Name[2] = "Woh lamhe who baaten"; a[2].Name[3] = "You belong with me"; a[2].Name[4] = "Exile"; a[2].Name[5] = "Cardigan"; a[2].Name[6] = "You need to calm down"; a[2].Name[7] = "Bad blood"; a[2].Name[8] = "Don’t blame me"; a[2].Name[9] = "Red";

		a[3].Name[0] = "Baby"; a[3].Name[1] = "Let me love you"; a[3].Name[2] = "Intentions"; a[3].Name[3] = "Sorry"; a[3].Name[4] = "Never say never"; a[3].Name[5] = "Come around me"; a[3].Name[6] = "U smile"; a[3].Name[7] = "One time"; a[3].Name[8] = "Nothing like us"; a[3].Name[9] = "Yummy";

		a[4].Name[0] = "Let me"; a[4].Name[1] = "Better"; a[4].Name[2] = "Dusk till dawn"; a[4].Name[3] = "Like I would"; a[4].Name[4] = "It’s you"; a[4].Name[5] = "Cruel"; a[4].Name[6] = "There you are"; a[4].Name[7] = "Satisfaction"; a[4].Name[8] = "You can’t hide"; a[4].Name[9] = "I won’t mind";

		get(a, size);

	}

	void get(Holly_Songs *N,const int size)const{

		for (int i = 0; i < size; i++)

		{

			for (int j = 0; j < size; j++) {

				cout << N[i].Name[j] << "\n";

			}

		}

	}

};

class Punj_Songs {

private:

	string Name[10];

public:

	void setname()

	{

		const int size = 5;

		Punj_Songs a[size];

		a[0].Name[0] = "Vichhoda"; a[0].Name[1] = "Sab kehnde ne o bewafa ne"; a[0].Name[2] = "Yaariyan"; a[0].Name[3] = "Mera deewana pan"; a[0].Name[4] = "Dildariyan"; a[0].Name[5] = "Mill k bethange"; a[0].Name[6] = "Juda"; a[0].Name[7] = "Lahoriye"; a[0].Name[8] = "Kurta"; a[0].Name[9] = "Family di member";

		a[1].Name[0] = "Baari"; a[1].Name[1] = "Uchiyan deewaran"; a[1].Name[2] = "Adhi adhi raat"; a[1].Name[3] = "12 saal"; a[1].Name[4] = "Suroor"; a[1].Name[5] = "Kaash"; a[1].Name[6] = "Snapchat story"; a[1].Name[7] = "2 number"; a[1].Name[8] = "Paranday"; a[1].Name[9] = "Chaskay";

		a[2].Name[0] = "High rated gabru"; a[2].Name[1] = "Naach meri raani"; a[2].Name[2] = "Lahore"; a[2].Name[3] = "Patola"; a[2].Name[4] = "Downtown"; a[2].Name[5] = "Ishq tera"; a[2].Name[6] = "Baby girl"; a[2].Name[7] = "Surma surma"; a[2].Name[8] = "Suit"; a[2].Name[9] = "Ishare tere";

		a[3].Name[0] = "Mahi Ve"; a[3].Name[1] = "Chup Chup Ke"; a[3].Name[2] = "Yaar Mila De"; a[3].Name[3] = "Ijazat"; a[3].Name[4] = "Tu Mera Dil"; a[3].Name[5] = "Dard Kahani"; a[3].Name[6] = "Rabba ho"; a[3].Name[7] = "Saajna"; a[3].Name[8] = "Ja Bewafa"; a[3].Name[9] = "Main Ki Karan";

		a[4].Name[0] = "Khyaal rakhya kr"; a[4].Name[1] = "Akhiyan"; a[4].Name[2] = "Nikle current"; a[4].Name[3] = "Puchda he nhi"; a[4].Name[4] = "Diamond da challa"; a[4].Name[5] = "Dilliwaliye"; a[4].Name[6] = "Pyaar te jaguar"; a[4].Name[7] = "Ring"; a[4].Name[8] = "Wah wai wah"; a[4].Name[9] = "Sorry";

		get(a, size);

	}

	void get(Punj_Songs *N,const int size)const{

		for (int i = 0; i<size; i++){

			for (int j = 0; j < size; j++){

				cout << N[i].Name[j] << "\n";

			}

		}

	}

};

class View : public Pk_Songs, public Bolly_Songs, public Holly_Songs, public Punj_Songs

{

	int c;

public:

	void set(){

		cout << "1 for Lollywood\n2 for Bollywood\n3 for Hollywood\n4 for Punjabi\n";

		cin >> c;

		if (c == 1){

			Pk_Songs::setname();

		}

		else if (c == 2){

			Bolly_Songs::setname();

		}

		else if (c == 3){

			Holly_Songs::setname();

		}

		else if (c == 4){

			Punj_Songs::setname();

		}

	}

};

int main(){

	View v;

	v.set();

	getchar();

	getchar();

	return 0;

}

       
 

Comments

Popular posts from this blog

Multiple inheritance,friend function and multiple file in oop(object oriented programming)

Concepts of OOP (object oriented programming)

Concepts in c++........