NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

//-----------------------------------------------------------------------------------------------------------------------------------
#include<iostream.h>
#include<conio.h>
#include<stdlib.h>
#include<stdio.h>
#include<dos.h>

class bookShop
{
private:
int ch,ch1;



public:
void viewItems ();
void details();
void sellItem ();
void itemCheck ();
};

//-----------------------------------------------------------------------------------------------------------------------------------


//SHOP DETAILS
//-----------------------------------------------------------------------------------------------------------------------------------


void bookShop :: details()
{
clrscr();
cout<<"nnnnnttttSHOP DETAILSnnn";
cout<<"nt%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%nn";
cout<<"tt # TIMING: 11 AM TO 02 PM & 03 PM TO 05 PM n";
cout<<"tt # SHOP WILL CLOSED ON FRIDAY. n";
cout<<"tt # GOODS ONCE SOLD WILL NOT BE EXCHANGED/REPLACED. n";
cout<<"tt # DO NOT BREAK ANY SHOP ITEMS. n";
cout<<"tt # FOR ANY COMPLAINT CONTACT THE CHAIR PERSON. n";
cout<<"tt # 25 YEARS OF EXPERIENCE. n";
cout<<"tt # CHAIR PERSON :- MR. SULEMAN KARIGAR. n";
cout<<"tt # Email :- [email protected] n";
cout<<"nt%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%nn";
}

//-----------------------------------------------------------------------------------------------------------------------------------



//VIEW ITEMS
//--------------------------------------------------------------------------------------------------------------------------------


void bookShop :: viewItems ()
{

cout << "nnHere's our list of categories, Please feel free to browse through them:";
cout << "n1. EDUCATIONAL GUIDES";
cout << "n2. FANTASY";
cout << "n3. BIOGRAPHY";

int ch2;
cout<<endl<<"n";
cin>>ch2;

switch(ch2)
{
case 1: clrscr();
cout<<"nnEDUCATIONAL GUIDES";
cout << "n1. SAT Subject tests (Set of 3)";
cout << "n2. R.S Agarwal Vol.XII";
cout << "n3. Sumita Arora CS XII";
cout << "n4. Together with (Set of 3; Math/ Phy/ Chem)";
cout << "n5. Princeton Review";
cout << "n6. Modern ABC Physics and Chemistry";
break;

case 2: clrscr();
cout << "nnFANTASY";
cout << "n7. Invisible Mann";
cout << "n8. The Adventures of Sherlock Holmes";
cout << "n9. Percy Jackson (ALL 5 BOOKS)";
cout << "n10. Maze Runner (ALL BOOKS)";
break;

case 3: clrscr();
cout << "nnBIOGRAPHY";
cout << "n11. Mein Kampf";
cout << "n12. The Autobiography of Malcolm X";
cout << "n13. Wings of Fire";
cout << "n14. The life of Mahatma Gandhi";
cout << "n15. Steve Jobs: The Book";
break;





default: cout<<"We have very limited genres, kindly select from the ones displayed.";
getch();
clrscr();
viewItems();
};




cout<<"nPlease choose your book: nn";

cin>>ch;
sellItem();
}


//-----------------------------------------------------------------------------------------------------------------------------------





//SELL ITEM
//-----------------------------------------------------------------------------------------------------------------------------------

void bookShop:: sellItem()
{
switch(ch)
{
case 1: clrscr();
cout<<"You have selected SAT Subject tests (Set of 3). Add to Cart?n";
cin>>ch1;
if(ch1==1){
itemCheck();
break;
}

else {clrscr();
viewItems();
break;
}

case 2: clrscr();
cout<<"You have selected R.S Agarwal Vol.XII. Add to Cart?n";
cin>>ch1;
if(ch1==1){
itemCheck();
break;
}

else {clrscr();
viewItems();
break;
}

case 3: clrscr();
cout<<"You have selected Sumita Arora CS XII. Add to Cart?n";
cin>>ch1;
if(ch1==1){
itemCheck();
break;
}

else {clrscr();
viewItems();
break;
}
case 4: clrscr();
cout<<"You have selected Together with (Set of 3; Math/ Phy/ Chem). Add to Cart?n";
cin>>ch1;
if(ch1==1){
itemCheck();
break;
}

else {clrscr();
viewItems();
break;
}

case 5: clrscr();
cout<<"You have selected Princeton Review . Add to Cart?n";
cin>>ch1;
if(ch1==1){
itemCheck();
break;
}

else {clrscr();
viewItems();
break;
}
case 6: clrscr();
cout<<"You have selected Modern ABC Physics and Chemistry. Add to Cart?n";
cin>>ch1;
if(ch1==1){
itemCheck();
break;
}

else {clrscr();
viewItems();
break;
}
case 7: clrscr();
cout<<"You have selected Invisible Man. Add to Cart?n";
cin>>ch1;
if(ch1==1){
itemCheck();
break;
}

else {clrscr();
viewItems();
break;
}
case 8:clrscr();
cout<<"You have selected The Adventures of Sherlock Holmes. Add to Cart?n";
cin>>ch1;
if(ch1==1){
itemCheck();
break;
}

else {clrscr();
viewItems();
break;
}
case 9: clrscr();
cout<<"You have selected Percy Jackson (ALL 5 BOOKS). Add to Cart?n";
cin>>ch1;
if(ch1==1){
itemCheck();
break;
}

else {clrscr();
viewItems();
break;
}

case 10: clrscr();
cout<<"You have selected Maze Runner (ALL BOOKS). Add to Cart?n";
cin>>ch1;
if(ch1==1){
itemCheck();
break;
}

else {clrscr();
viewItems();
break;
}
case 11:clrscr();
cout<<"You have selected Mein Kampf. Add to Cart?n";
cin>>ch1;
if(ch1==1){
itemCheck();
break;
}

else {clrscr();
viewItems();
break;
}

case 12:clrscr();
cout<<"You have selected The Autobiography of Malcolm X. Add to Cart?n";
cin>>ch1;
if(ch1==1){
itemCheck();
break;
}

else {clrscr();
viewItems();
break;
}
case 13: clrscr();
cout<<"You have selected Wings of Fire. Add to Cart?n";
cin>>ch1;
if(ch1==1){
itemCheck();
break;
}

else {clrscr();
viewItems();
break;
}

case 14: clrscr();
cout<<"You have selected The life of Mahatma Gandhi. Add to Cart?n";
cin>>ch1;
if(ch1==1){
itemCheck();
break;
}

else {clrscr();
viewItems();
break;
}
case 15:clrscr();
cout<<"You have selected Steve Jobs. Add to Cart?n";
cin>>ch1;
if(ch1==1){
itemCheck();
break;
}

else {clrscr();
viewItems();
break;
}
default: cout<<"nnPlease choose a valid option.";
sleep(2);
clrscr();
viewItems();



};

}
//-----------------------------------------------------------------------------------------------------------------------------------


//ITEM CHECK
//-----------------------------------------------------------------------------------------------------------------------------------

void bookShop :: itemCheck()
{ ;
int stock[15],i;
for(i=1;i<15;i++)
{ stock[i]=1;}

stock[i]=1;

if(stock[i]==1)
{
clrscr();

/* int numbers[5]= { 1, 2 ,3 ,4, 5};
randomize();
int n=random(5);
*/
cout<<"nYour products been sold, it will be delivered by tommorow days, would you like to continue shopping?n";
int ch6;
cin>>ch6;
switch(ch6)
{
case 1: clrscr();
viewItems();
break;

case 2:clrscr();
cout<<"nThank you for shopping with us. Please come back again later. ";
sleep(2);
exit(0);
break;

default: clrscr();
cout<<"nInvalid";
sleep(1);
clrscr();
itemCheck();
};

}
}

//------------------------------------------------------------------------------------------------------------------------------------





//MAINNNNNNNNNNNNNNN
//-----------------------------------------------------------------------------------------------------------------------------------
void main() {
int ch3,ch6;
bookShop obj;
for( ; ch3!=0 ; )
{

system("cls");
cout << "nnWelcome to IISJ Library.nWe sell a variety of books, ranging from educational guides to kids rhymes.";
cout << "nPlease, also note that 1 stands for 'YES' and 2 stands for 'NO'.nnThank you for cooperation.nn";
system("pause 1");
clrscr();
cout << "nnWhat would you like to do: ";
cout << "n1. View item list";
cout << "n2. Shop Details";
cout << "n3. Exit the program";
cout << "nEnter choice: ";
cin>>ch3;
switch (ch3)
{ case 1: clrscr();
obj.viewItems();
obj.sellItem ();


break;

case 2: obj.details();
break;

case 3: clrscr();
cout<<"Thank you for visiting";
sleep(1);
exit(0);

default: cout<<"Plz for the love of god, ENTER A GODDAMN VALID CHOICE! ALREADY TIRED OF THIS BS! MAKE THIS FUCKING QUICK A'IGHT?";




}
}
}
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.