473,405 Members | 2,415 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

library system

I am trying to develop a small program which does library books. I have tried the code below but it still does not work. Can someone help me to debug the program and advice accordingly.


ii) // This program get or request the customer to enter their details and or details of the book.
Expand|Select|Wrap|Line Numbers
  1. # include <iostream.h>
  2. # include “Library.h”
  3. int Main ()
  4. {
  5. Void display Customer details (Char*Char[], String);
  6. Void display books details (Char*Char[], double);
  7. Void display books on loan (Char, date)
  8. Void display books due (Char, date);
  9.  
  10.  
  11.  
  12.  
  13. Void add customers, books (Char*Char[], double);
  14. Void print report details (Char, double, string);
  15. }
  16. Void Library: : display customers details ()
  17. {
  18. cout << “Enter First name” <<endl;
  19. cin >> First name;
  20. cout << “Enter Last Name” <<endl;
  21. cin >> Last name;
  22. cout << “Enter Address” <<endl;
  23. cin >> Address;
  24. cout << “Enter telephone number” <<endl;
  25. cin >> telephone number;
  26. }
  27. Void Library: : Display Book details ()
  28. {
  29. cout << “Enter Title” <<endl;
  30. cin >> Title;
  31. cout << “Enter Author” <<endl;
  32. cin >> Aithor;
  33. cout << “Enter ISDN Number” <<endl;
  34. cin >> ISDN Number;
  35. cout << “Enter Number of pages” <<endl;
  36. cin >> Number of pages;
  37. }
  38. Void Library: : Display book loans ()
  39. {
  40. int on loan date;
  41. int date due returned;
  42. cout << “enter on loan date” <<endl;
  43. cin >> on loan date;
  44. cout << “Enter date due returned” <<endl;
  45. cin >> Date due returned;
  46. }
  47.  
  48. Void Library: : Add Customer, Books ()
  49. {
  50. cout << “Add First name”<<First name<< “Last name” <<Last name<< “Address” <<Address<< “telephone number” <<telephone number<<endl;
  51. cin >>First name >>last name >>Address >>Telephone number;
  52. cout << “Add Title<< Title<< “Author”<< Author<< “ISDN Number”<< ISDN Number<< “number of pages”<< Number of pages <<endl;
  53. cin >> Title>> Author>> ISDN number>> Number of pages;
  54. }
  55. Void Library: : Display customer loans ()
  56. {
  57. int on loan date;
  58. int date due returned;
  59. cout << “enter on loan date” <<endl;
  60. cin >> on loan date;
  61. cout <<”Enter date due returned” <<endl;
  62. cin >> Date due returned;
  63. }
  64. Void Library: : Print detail report ()
  65. cout << “The details of each customer with loan books is”<<customer<<endl;
  66. cout<< “The detail of each book on loan is”<<book<<endl;
  67. cout << “The detail of loan is” <<loan<<endl;
  68.                 or
  69. }
  70. Void Library: : print detail report()
  71. cout << “customer”<< “book”<< “loan”<<endl;
  72. cin >> customer>>book>>loan>>endl;
  73. }
  74. Return 0;
  75.  
  76.  
  77.  
  78.  
  79. iii)    Class Customer
  80. {
  81. Public: :        // Modifiers
  82.     Customer (); // default constructor
  83. Void display customer details (Char*Char [], String);
  84. Private: :        // Queries
  85.     Char First name [20], Last name[25];
  86.     Char Address;
  87.     String Telephone number;
  88. };
  89.  
  90.  
  91.  
  92.  
  93.  
  94. iv)    Class Library
  95. {
  96. Public : 
  97.         Library ();
  98.         Void display total records of books (Char, double);
  99.  
  100. Private:
  101.         Char Title, Author;
  102.         Double ISDN number, Number of pages
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116. v)    Void Library: : Add Customer, Books ()
  117. {
  118. cout << “Add Title<< UML Distilled<< “Author”<< Martin Fowler<< “ISDN Number”<< ISDN [0-201-32563]<< “number of pages”<< 170 pages <<endl;
  119. cin >> UML Distilled >> Martin Fowler >> ISDN [0-201-32563]>> 170 pages;
  120. };
  121. cout << “Add Title<< C++ Primer<< “Author”<< Stanley B Lippman<< “ISDN Number”<< ISDN[0-201-16487-6]<< “number of pages”<< 540 pages <<endl;
  122. cin >> C++ Primer >> Stanley B Lippman>>ISDN[0-201-16487-6]>> 540 pages;
  123. }
  124. Return 0;
  125.  
  126. Void Library: : Add Customer, Books ()
  127. {
  128. cout << “Add First name”<<Joe<< “Last name”<<Bloggs<< “Address” <<123 Kloof Street cape town<< “telephone number” <<4611111<<endl;
  129. cin >> Joe>> Bloggs>>123 Kloof Street Cape Town>> 4611111;
  130. };
  131. cout << “Add First name”<<John<< “Last name”<<Smith<< “Address” <<111 Lansdowne Road Claremont<< “telephone number” <<6711111<<endl;
  132. cin >> John>> Smith>>111 Lansdowne Road Claremont>> 6711111;
  133. }
  134. Return 0;
  135.  
  136.  
  137.  
  138.  
  139. Void Library: : Display customer loans ()
  140. {
  141. cin >> Joe>> Bloggs>>123 Kloof Street Cape Town>> 4611111;
  142. };
  143. cin >> C++ Primer >> Stanley B Lippman>>ISDN[0-201-16487-6]>> 540 pages;
  144. };
  145. int on loan date;
  146. int date due returned;
  147. cout << “2004/05/10” <<endl;
  148. cin >> 2004/05/10;
  149. cout <<”2004/05/20” <<endl;
  150. cin >> 2004/05/20;
  151. }
  152. Return 0;
  153.  
  154. Void Library: : Display customer loans ()
  155. {    
  156. cin >> John>> Smith>>111 Lansdowne Road Claremont>> 6711111;
  157. };
  158. cin >> UML Distilled >> Martin Fowler>>ISDN[0-201-32563]>> 170 pages;
  159. };
  160. int on loan date;
  161. int date due returned;
  162. cout << “2004/08/28” <<endl;
  163. cin >> 2004/08/28;
  164. cout <<”2004/09/07” <<endl;
  165. cin >> 2004/09/07;
  166. }
  167. Return 0;
  168.  
  169.  
  170.  
  171.  
  172. Void Library: : Print detail report()
  173. cout <<“loans”<<endl;
  174. cin >> loans>>endl;
  175. }
  176. Return 0;
Feb 12 '07 #1
3 2060
Ganon11
3,652 Expert 2GB
What compiler are you using?
Feb 12 '07 #2
r035198x
13,262 8TB
I am trying to develop a small program which does library books. I have tried the code below but it still does not work. Can someone help me to debug the program and advice accordingly.


ii) // This program get or request the customer to enter their details and or details of the book.
Expand|Select|Wrap|Line Numbers
  1. # include <iostream.h>
  2. # include “Library.h”
  3. int Main ()
  4. {
  5. Void display Customer details (Char*Char[], String);
  6. Void display books details (Char*Char[], double);
  7. Void display books on loan (Char, date)
  8. Void display books due (Char, date);
  9.  
  10.  
  11.  
  12.  
  13. Void add customers, books (Char*Char[], double);
  14. Void print report details (Char, double, string);
  15. }
  16. Void Library: : display customers details ()
  17. {
  18. cout << “Enter First name” <<endl;
  19. cin >> First name;
  20. cout << “Enter Last Name” <<endl;
  21. cin >> Last name;
  22. cout << “Enter Address” <<endl;
  23. cin >> Address;
  24. cout << “Enter telephone number” <<endl;
  25. cin >> telephone number;
  26. }
  27. Void Library: : Display Book details ()
  28. {
  29. cout << “Enter Title” <<endl;
  30. cin >> Title;
  31. cout << “Enter Author” <<endl;
  32. cin >> Aithor;
  33. cout << “Enter ISDN Number” <<endl;
  34. cin >> ISDN Number;
  35. cout << “Enter Number of pages” <<endl;
  36. cin >> Number of pages;
  37. }
  38. Void Library: : Display book loans ()
  39. {
  40. int on loan date;
  41. int date due returned;
  42. cout << “enter on loan date” <<endl;
  43. cin >> on loan date;
  44. cout << “Enter date due returned” <<endl;
  45. cin >> Date due returned;
  46. }
  47.  
  48. Void Library: : Add Customer, Books ()
  49. {
  50. cout << “Add First name”<<First name<< “Last name” <<Last name<< “Address” <<Address<< “telephone number” <<telephone number<<endl;
  51. cin >>First name >>last name >>Address >>Telephone number;
  52. cout << “Add Title<< Title<< “Author”<< Author<< “ISDN Number”<< ISDN Number<< “number of pages”<< Number of pages <<endl;
  53. cin >> Title>> Author>> ISDN number>> Number of pages;
  54. }
  55. Void Library: : Display customer loans ()
  56. {
  57. int on loan date;
  58. int date due returned;
  59. cout << “enter on loan date” <<endl;
  60. cin >> on loan date;
  61. cout <<”Enter date due returned” <<endl;
  62. cin >> Date due returned;
  63. }
  64. Void Library: : Print detail report ()
  65. cout << “The details of each customer with loan books is”<<customer<<endl;
  66. cout<< “The detail of each book on loan is”<<book<<endl;
  67. cout << “The detail of loan is” <<loan<<endl;
  68.                 or
  69. }
  70. Void Library: : print detail report()
  71. cout << “customer”<< “book”<< “loan”<<endl;
  72. cin >> customer>>book>>loan>>endl;
  73. }
  74. Return 0;
  75.  
  76.  
  77.  
  78.  
  79. iii)    Class Customer
  80. {
  81. Public: :        // Modifiers
  82.     Customer (); // default constructor
  83. Void display customer details (Char*Char [], String);
  84. Private: :        // Queries
  85.     Char First name [20], Last name[25];
  86.     Char Address;
  87.     String Telephone number;
  88. };
  89.  
  90.  
  91.  
  92.  
  93.  
  94. iv)    Class Library
  95. {
  96. Public : 
  97.         Library ();
  98.         Void display total records of books (Char, double);
  99.  
  100. Private:
  101.         Char Title, Author;
  102.         Double ISDN number, Number of pages
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116. v)    Void Library: : Add Customer, Books ()
  117. {
  118. cout << “Add Title<< UML Distilled<< “Author”<< Martin Fowler<< “ISDN Number”<< ISDN [0-201-32563]<< “number of pages”<< 170 pages <<endl;
  119. cin >> UML Distilled >> Martin Fowler >> ISDN [0-201-32563]>> 170 pages;
  120. };
  121. cout << “Add Title<< C++ Primer<< “Author”<< Stanley B Lippman<< “ISDN Number”<< ISDN[0-201-16487-6]<< “number of pages”<< 540 pages <<endl;
  122. cin >> C++ Primer >> Stanley B Lippman>>ISDN[0-201-16487-6]>> 540 pages;
  123. }
  124. Return 0;
  125.  
  126. Void Library: : Add Customer, Books ()
  127. {
  128. cout << “Add First name”<<Joe<< “Last name”<<Bloggs<< “Address” <<123 Kloof Street cape town<< “telephone number” <<4611111<<endl;
  129. cin >> Joe>> Bloggs>>123 Kloof Street Cape Town>> 4611111;
  130. };
  131. cout << “Add First name”<<John<< “Last name”<<Smith<< “Address” <<111 Lansdowne Road Claremont<< “telephone number” <<6711111<<endl;
  132. cin >> John>> Smith>>111 Lansdowne Road Claremont>> 6711111;
  133. }
  134. Return 0;
  135.  
  136.  
  137.  
  138.  
  139. Void Library: : Display customer loans ()
  140. {
  141. cin >> Joe>> Bloggs>>123 Kloof Street Cape Town>> 4611111;
  142. };
  143. cin >> C++ Primer >> Stanley B Lippman>>ISDN[0-201-16487-6]>> 540 pages;
  144. };
  145. int on loan date;
  146. int date due returned;
  147. cout << “2004/05/10” <<endl;
  148. cin >> 2004/05/10;
  149. cout <<”2004/05/20” <<endl;
  150. cin >> 2004/05/20;
  151. }
  152. Return 0;
  153.  
  154. Void Library: : Display customer loans ()
  155. {    
  156. cin >> John>> Smith>>111 Lansdowne Road Claremont>> 6711111;
  157. };
  158. cin >> UML Distilled >> Martin Fowler>>ISDN[0-201-32563]>> 170 pages;
  159. };
  160. int on loan date;
  161. int date due returned;
  162. cout << “2004/08/28” <<endl;
  163. cin >> 2004/08/28;
  164. cout <<”2004/09/07” <<endl;
  165. cin >> 2004/09/07;
  166. }
  167. Return 0;
  168.  
  169.  
  170.  
  171.  
  172. Void Library: : Print detail report()
  173. cout <<“loans”<<endl;
  174. cin >> loans>>endl;
  175. }
  176. Return 0;
Ummm C++ keywords are all lower case.
Feb 12 '07 #3
Ganon11
3,652 Expert 2GB
Please don't double-post: I have deleted the newer thread. Refer to this thread for our policy on double-posting.
Feb 13 '07 #4

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

Similar topics

6
by: Patrick | last post by:
Following earlier discussions about invoking a .NET class library via ..NET-COM Interop (using regasm /tlb) at...
7
by: Sonny | last post by:
I need to port a library that is written entirely in C to C++. The library is supported on quite a few platforms (windows, Solaris, Linux, AIX, HP-UX, OSX, etc...) and there's quite an existing...
4
by: ±èµ¿±Õ | last post by:
Tell me why the symbol "_" use in the Library? For example, char *_itoa( int value, char *string, int radix ); But We use function "itoa(value,string,radix) "only. I want to know the...
1
by: Jim | last post by:
Have fully operational software package developed on VB.NET that worked until Jan 1 2003, with early stage deployments on Oct 10, Oct 23, Nov 11, Dec 12 and Dec 30. When attempted final...
5
by: Jesper Schmidt | last post by:
When does CLR performs initialization of static variables in a class library? (1) when the class library is loaded (2) when a static variable is first referenced (3) when... It seems that...
4
by: Dave | last post by:
hi, I wrote class library that contain a struct stX and a new class library that get the first class library as referance and implement a function foo that one of its parametrs is of type of the...
6
by: leoman730 | last post by:
This is one of the interview question this morning, hope someone can help out with this. Thanks. What is the different between System call and library call?
20
by: J de Boyne Pollard | last post by:
MThe library functions which are included to allow process Mlaunch, forking, and termination, imply that it is both Mpossible and desirable for a process to fork itself. This is Ma fundamental...
21
by: omkar pangarkar | last post by:
Hi all, I have two simple hello world programs one using printf() and other using write() --prog 1-- #include<stdio.h> #include<stdlib.h> int main() { printf("Hello"); /* up to here...
20
by: Nickolai Leschov | last post by:
Hello all, I am programming an embedded controller that has a 'C' library for using its system functions (I/O, timers, all the specific devices). The supplied library has .LIB and .H files. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
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
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...

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.