Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- #include <string>
- using namespace std;
- class Kasetofoni
- {
- public: bool Statusi; int Sasia_e_Kengve, Perqindja_e_bateris; string Kenga_aktuale;
- void NdezKasetofonin()
- {
- if (Statusi == true)
- {
- cout << "Kasetofoni eshte i ndezur " << endl;
- }
- else
- {
- cout << "Kasetofoni nuk eshte i ndezur" << endl;
- }
- };
- void ShtoKenge()
- {
- int i;
- cout << "Sa kenge deshironi te shtoni : ";
- cin >> i;
- if (i >= 100)
- {
- cout << "Keni shtuar shum kenge " << endl;
- }
- else
- {
- Sasia_e_Kengve = Sasia_e_Kengve + i;
- }
- };
- void LargoKenge()
- {
- int i;
- cout << "Sa kenge deshironi te largoni : ";
- cin >> i;
- if (i <= Sasia_e_Kengve)
- {
- Sasia_e_Kengve = Sasia_e_Kengve - i;
- }
- else {
- cout << "Nuk mund te largoni ket shum te kengve " << endl;
- }
- };
- void Kengaaktuale()
- {
- if (0<=Sasia_e_Kengve) {
- cout << "Ju keni fshir te gjitha kenget." << endl;
- }
- else {
- cout << "Kenga aktuale eshte : " << Kenga_aktuale;
- }
- };
- };
- int _tmain(int argc, _TCHAR* argv[])
- {
- Kasetofoni kaset;
- kaset.Sasia_e_Kengve = 10;
- kaset.Perqindja_e_bateris = 45;
- kaset.Kenga_aktuale = "Baresha";
- kaset.Statusi = true;
- if (kaset.Statusi == true) {
- kaset.NdezKasetofonin();
- cout << "Sasia e bateri eshte : " << kaset.Perqindja_e_bateris << " %" << endl;
- }
- if (kaset.Statusi == true)
- {
- int pytsori;
- cout << "Shtyp 1 qe te shtoni kenge " << endl;
- cout << "Shtyp 2 qe te largoni kenge " << endl;
- cout << "Shtyp 3 qe te shikoni sasin e kengeve ne playlist " << endl;
- cout << "Shtypni: ";
- cin >> pytsori;
- if (pytsori == 1)
- {
- kaset.ShtoKenge();
- }
- else if (pytsori == 2)
- {
- kaset.LargoKenge();
- }
- else if (pytsori == 3)
- {
- cout << "Ne play listen ton kemi : " << kaset.Sasia_e_Kengve << endl;
- }
- }
- else
- {
- cout << "Kasetofoni nuk eshte i ndezur " << endl;
- }
- if (kaset.Statusi == true)
- {
- cout << "Ju keni ne play list : " << kaset.Sasia_e_Kengve << " kenge" << endl;
- cout << "Kenga e momentetit eshte : " << kaset.Kenga_aktuale << endl;
- }
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement