Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandigupta authored May 27, 2024
1 parent 7101be1 commit d8bc46f
Showing 1 changed file with 79 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
#include <bits/stdc++.h>
using namespace std;

class YouTubeChannel
{
private:
string name;
string OwnerName;
int SubscribersCount;
list<string> PublishedVidioTitles;

public:
YouTubeChannel(string Name, string Owner)
{
name = Name;
OwnerName = Owner;
SubscribersCount = 0;
}

void subscribersCount()
{
SubscribersCount++;
}
void unsubscribersing()
{
if (SubscribersCount > 0)
{
SubscribersCount--;
}
}

void publishedVidioTitale(string title)
{
PublishedVidioTitles.push_back(title);
}

void getInfo()
{
cout << "Name: " << name << endl;
cout << "Owner Name: " << OwnerName << endl;
cout << "Subscribers Count: " << SubscribersCount << endl;
for (auto it : PublishedVidioTitles)
{
cout << it << endl;
}
}
};

class CockingYouTubeChannel : public YouTubeChannel
{
public:
CockingYouTubeChannel(string N, string o) : YouTubeChannel(N, o){

};
};

int main()
{
YouTubeChannel myChannel("Space", "Sandeep");
myChannel.subscribersCount();
myChannel.subscribersCount();
myChannel.unsubscribersing();
myChannel.publishedVidioTitale("Hartless");
myChannel.getInfo();
CockingYouTubeChannel coockingChannel("Amiy's Cocking channel", "Amiy");
coockingChannel.getInfo();

// myChannel.name = "CodeBeauty";
// myChannel.OwnerName = "Salena";
// myChannel.SubscribersCount = 1800;
// myChannel.PublishedVidioTitles = {"C++ for beggginer vedio 1", "HTML & CSS Video 1", "c++ OOP video 1"};

// cout << "Name=" << myChannel.name << endl;
// cout << "Owner Name=" << myChannel.OwnerName << endl;
// cout << "Subscriber Count=" << myChannel.SubscribersCount << endl;
// for (string it: myChannel.PublishedVidioTitles){
// cout << it << endl;
// }
}

0 comments on commit d8bc46f

Please sign in to comment.