473,506 Members | 17,000 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Book borrowing system

20 New Member
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
1 7137
AdrianH
1,251 Recognized Expert Top Contributor
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

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

Similar topics

4
1446
by: C++ Shark | last post by:
Hi!, sorry for this cross post, but i am not sure which group is most relevant to my question. I am looking for a good book on programming in C/C++ for the intel processors. If you know of any...
85
3184
by: masood.iqbal | last post by:
I know that this topic may inflame the "C language Taleban", but is there any prospect of some of the neat features of C++ getting incorporated in C? No I am not talking out the OO stuff. I am...
7
2532
by: DotNetDeveloper | last post by:
Does anyone have any opinion about this book: ".NET Graphics and Printing" Peter G. Aitken ISBN 1931097043 http://www.amazon.com/exec/obidos/ASIN/1931097046/ Can someone new to both...
11
3247
by: Robert Schuldenfrei | last post by:
I am an older person trying to learn C# just for the fun of it. I am a veteran of older style languages (COBOL, FORTRAN, etc.) and I want to learn an Object Orientated language. Currently working...
3
322
by: Griff | last post by:
I wish to buy a book to help me with the following "adventure". I've tried to specify what I need to achieve and my current level of ability. What I want to achieve: The decision has been made...
24
2104
by: Noah Roberts | last post by:
Item #1 in the More Exceptional C++ book uses the following construct: fstream in; .... process( in.is_open() ? in : cin,...); Where process has been shown as having various multiple...
4
5595
by: jchimanzi | last post by:
Please can someone help in correcting the following attempt of the questions below. I have included my attempt at the problem I have been asked to write class definations which does the following...
11
2429
cjbrx3115
by: cjbrx3115 | last post by:
Hey guys- I just got this email from my friend. I'm not sure it will really work (it's a forward), so I'm askin' you people. Well, here it is: ...
23
2722
by: sophia.agnes | last post by:
Dear all, I was going through a C book written by an indian author the following are the questions given in that book 1) consider the following statement: s1 : an operator may require an...
0
7103
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7370
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7478
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5614
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5035
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4701
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3188
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3177
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
409
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.