By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,233 Members | 2,041 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,233 IT Pros & Developers. It's quick & easy.

Book borrowing system

P: 20
Can someone check this program for me to see if its correct. I need to have a program which is able to add books,add customers, allow customer x to take out book y, and print out report

v)
Expand|Select|Wrap|Line Numbers
  1. Void Library: : Add Customer, Books ()
  2. {
  3. cout << “Add Title<< UML Distilled<< “Author”<< Martin Fowler<< “ISDN Number”<< ISDN [0-201-32563]<< “number of pages”<< 170 pages <<endl;
  4. cin >> UML Distilled >> Martin Fowler >> ISDN [0-201-32563]>> 170 pages;
  5. };
  6. cout << “Add Title<< C++ Primer<< “Author”<< Stanley B Lippman<< “ISDN Number”<< ISDN[0-201-16487-6]<< “number of pages”<< 540 pages <<endl;
  7. cin >> C++ Primer >> Stanley B Lippman>>ISDN[0-201-16487-6]>> 540 pages;
  8. }
  9. Return 0;
  10.  
  11. Void Library: : Add Customer, Books ()
  12. {
  13. cout << “Add First name”<<Joe<< “Last name”<<Bloggs<< “Address” <<123 Kloof Street cape town<< “telephone number” <<4611111<<endl;
  14. cin >> Joe>> Bloggs>>123 Kloof Street Cape Town>> 4611111;
  15. };
  16. cout << “Add First name”<<John<< “Last name”<<Smith<< “Address” <<111 Lansdowne Road Claremont<< “telephone number” <<6711111<<endl;
  17. cin >> John>> Smith>>111 Lansdowne Road Claremont>> 6711111;
  18. }
  19. Return 0;
  20.  
  21.  
  22.  
  23.  
  24. Void Library: : Display customer loans ()
  25. {
  26. cin >> Joe>> Bloggs>>123 Kloof Street Cape Town>> 4611111;
  27. };
  28. cin >> C++ Primer >> Stanley B Lippman>>ISDN[0-201-16487-6]>> 540 pages;
  29. };
  30. int on loan date;
  31. int date due returned;
  32. cout << “2004/05/10” <<endl;
  33. cin >> 2004/05/10;
  34. cout <<”2004/05/20” <<endl;
  35. cin >> 2004/05/20;
  36. }
  37. Return 0;
  38.  
  39. Void Library: : Display customer loans ()
  40. {    
  41. cin >> John>> Smith>>111 Lansdowne Road Claremont>> 6711111;
  42. };
  43. cin >> UML Distilled >> Martin Fowler>>ISDN[0-201-32563]>> 170 pages;
  44. };
  45. int on loan date;
  46. int date due returned;
  47. cout << “2004/08/28” <<endl;
  48. cin >> 2004/08/28;
  49. cout <<”2004/09/07” <<endl;
  50. cin >> 2004/09/07;
  51. }
  52. Return 0;
  53.  
  54.  
  55.  
  56.  
  57. Void Library: : Print detail report()
  58. cout <<“loans”<<endl;
  59. cin >> loans>>endl;
  60. }
  61. Return 0;
Feb 17 '07 #1
Share this Question
Share on Google+
1 Reply


AdrianH
Expert 100+
P: 1,251
Can someone check this program for me to see if its correct. I need to have a program which is able to add books,add customers, allow customer x to take out book y, and print out report

v) Void Library: : Add Customer, Books ()
{
cout << “Add Title<< UML Distilled<< “Author”<< Martin Fowler<< “ISDN Number”<< ISDN [0-201-32563]<< “number of pages”<< 170 pages <<endl;
cin >> UML Distilled >> Martin Fowler >> ISDN [0-201-32563]>> 170 pages;
};
cout << “Add Title<< C++ Primer<< “Author”<< Stanley B Lippman<< “ISDN Number”<< ISDN[0-201-16487-6]<< “number of pages”<< 540 pages <<endl;
cin >> C++ Primer >> Stanley B Lippman>>ISDN[0-201-16487-6]>> 540 pages;
}
Return 0;

Void Library: : Add Customer, Books ()
{
cout << “Add First name”<<Joe<< “Last name”<<Bloggs<< “Address” <<123 Kloof Street cape town<< “telephone number” <<4611111<<endl;
cin >> Joe>> Bloggs>>123 Kloof Street Cape Town>> 4611111;
};
cout << “Add First name”<<John<< “Last name”<<Smith<< “Address” <<111 Lansdowne Road Claremont<< “telephone number” <<6711111<<endl;
cin >> John>> Smith>>111 Lansdowne Road Claremont>> 6711111;
}
Return 0;




Void Library: : Display customer loans ()
{
cin >> Joe>> Bloggs>>123 Kloof Street Cape Town>> 4611111;
};
cin >> C++ Primer >> Stanley B Lippman>>ISDN[0-201-16487-6]>> 540 pages;
};
int on loan date;
int date due returned;
cout << “2004/05/10” <<endl;
cin >> 2004/05/10;
cout <<”2004/05/20” <<endl;
cin >> 2004/05/20;
}
Return 0;

Void Library: : Display customer loans ()
{
cin >> John>> Smith>>111 Lansdowne Road Claremont>> 6711111;
};
cin >> UML Distilled >> Martin Fowler>>ISDN[0-201-32563]>> 170 pages;
};
int on loan date;
int date due returned;
cout << “2004/08/28” <<endl;
cin >> 2004/08/28;
cout <<”2004/09/07” <<endl;
cin >> 2004/09/07;
}
Return 0;




Void Library: : Print detail report()
cout <<“loans”<<endl;
cin >> loans>>endl;
}
Return 0;
Sorry, what you posted is not compilable, which means you haven't probably tested it yourself. Until such time, no one will help you here. If you have a more specific question, please post that.


Adrian
Feb 18 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.