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. - # include <iostream.h>
-
# include “Library.h”
-
int Main ()
-
{
-
Void display Customer details (Char*Char[], String);
-
Void display books details (Char*Char[], double);
-
Void display books on loan (Char, date)
-
Void display books due (Char, date);
-
-
-
-
-
Void add customers, books (Char*Char[], double);
-
Void print report details (Char, double, string);
-
}
-
Void Library: : display customers details ()
-
{
-
cout << “Enter First name” <<endl;
-
cin >> First name;
-
cout << “Enter Last Name” <<endl;
-
cin >> Last name;
-
cout << “Enter Address” <<endl;
-
cin >> Address;
-
cout << “Enter telephone number” <<endl;
-
cin >> telephone number;
-
}
-
Void Library: : Display Book details ()
-
{
-
cout << “Enter Title” <<endl;
-
cin >> Title;
-
cout << “Enter Author” <<endl;
-
cin >> Aithor;
-
cout << “Enter ISDN Number” <<endl;
-
cin >> ISDN Number;
-
cout << “Enter Number of pages” <<endl;
-
cin >> Number of pages;
-
}
-
Void Library: : Display book loans ()
-
{
-
int on loan date;
-
int date due returned;
-
cout << “enter on loan date” <<endl;
-
cin >> on loan date;
-
cout << “Enter date due returned” <<endl;
-
cin >> Date due returned;
-
}
-
-
Void Library: : Add Customer, Books ()
-
{
-
cout << “Add First name”<<First name<< “Last name” <<Last name<< “Address” <<Address<< “telephone number” <<telephone number<<endl;
-
cin >>First name >>last name >>Address >>Telephone number;
-
cout << “Add Title<< Title<< “Author”<< Author<< “ISDN Number”<< ISDN Number<< “number of pages”<< Number of pages <<endl;
-
cin >> Title>> Author>> ISDN number>> Number of pages;
-
}
-
Void Library: : Display customer loans ()
-
{
-
int on loan date;
-
int date due returned;
-
cout << “enter on loan date” <<endl;
-
cin >> on loan date;
-
cout <<”Enter date due returned” <<endl;
-
cin >> Date due returned;
-
}
-
Void Library: : Print detail report ()
-
cout << “The details of each customer with loan books is”<<customer<<endl;
-
cout<< “The detail of each book on loan is”<<book<<endl;
-
cout << “The detail of loan is” <<loan<<endl;
-
or
-
}
-
Void Library: : print detail report()
-
cout << “customer”<< “book”<< “loan”<<endl;
-
cin >> customer>>book>>loan>>endl;
-
}
-
Return 0;
-
-
-
-
-
iii) Class Customer
-
{
-
Public: : // Modifiers
-
Customer (); // default constructor
-
Void display customer details (Char*Char [], String);
-
Private: : // Queries
-
Char First name [20], Last name[25];
-
Char Address;
-
String Telephone number;
-
};
-
-
-
-
-
-
iv) Class Library
-
{
-
Public :
-
Library ();
-
Void display total records of books (Char, double);
-
-
Private:
-
Char Title, Author;
-
Double ISDN number, Number of pages
-
-
-
-
-
-
-
-
-
-
-
-
-
-
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;
3 2060
What compiler are you using?
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. - # include <iostream.h>
-
# include “Library.h”
-
int Main ()
-
{
-
Void display Customer details (Char*Char[], String);
-
Void display books details (Char*Char[], double);
-
Void display books on loan (Char, date)
-
Void display books due (Char, date);
-
-
-
-
-
Void add customers, books (Char*Char[], double);
-
Void print report details (Char, double, string);
-
}
-
Void Library: : display customers details ()
-
{
-
cout << “Enter First name” <<endl;
-
cin >> First name;
-
cout << “Enter Last Name” <<endl;
-
cin >> Last name;
-
cout << “Enter Address” <<endl;
-
cin >> Address;
-
cout << “Enter telephone number” <<endl;
-
cin >> telephone number;
-
}
-
Void Library: : Display Book details ()
-
{
-
cout << “Enter Title” <<endl;
-
cin >> Title;
-
cout << “Enter Author” <<endl;
-
cin >> Aithor;
-
cout << “Enter ISDN Number” <<endl;
-
cin >> ISDN Number;
-
cout << “Enter Number of pages” <<endl;
-
cin >> Number of pages;
-
}
-
Void Library: : Display book loans ()
-
{
-
int on loan date;
-
int date due returned;
-
cout << “enter on loan date” <<endl;
-
cin >> on loan date;
-
cout << “Enter date due returned” <<endl;
-
cin >> Date due returned;
-
}
-
-
Void Library: : Add Customer, Books ()
-
{
-
cout << “Add First name”<<First name<< “Last name” <<Last name<< “Address” <<Address<< “telephone number” <<telephone number<<endl;
-
cin >>First name >>last name >>Address >>Telephone number;
-
cout << “Add Title<< Title<< “Author”<< Author<< “ISDN Number”<< ISDN Number<< “number of pages”<< Number of pages <<endl;
-
cin >> Title>> Author>> ISDN number>> Number of pages;
-
}
-
Void Library: : Display customer loans ()
-
{
-
int on loan date;
-
int date due returned;
-
cout << “enter on loan date” <<endl;
-
cin >> on loan date;
-
cout <<”Enter date due returned” <<endl;
-
cin >> Date due returned;
-
}
-
Void Library: : Print detail report ()
-
cout << “The details of each customer with loan books is”<<customer<<endl;
-
cout<< “The detail of each book on loan is”<<book<<endl;
-
cout << “The detail of loan is” <<loan<<endl;
-
or
-
}
-
Void Library: : print detail report()
-
cout << “customer”<< “book”<< “loan”<<endl;
-
cin >> customer>>book>>loan>>endl;
-
}
-
Return 0;
-
-
-
-
-
iii) Class Customer
-
{
-
Public: : // Modifiers
-
Customer (); // default constructor
-
Void display customer details (Char*Char [], String);
-
Private: : // Queries
-
Char First name [20], Last name[25];
-
Char Address;
-
String Telephone number;
-
};
-
-
-
-
-
-
iv) Class Library
-
{
-
Public :
-
Library ();
-
Void display total records of books (Char, double);
-
-
Private:
-
Char Title, Author;
-
Double ISDN number, Number of pages
-
-
-
-
-
-
-
-
-
-
-
-
-
-
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;
Ummm C++ keywords are all lower case.
Please don't double-post: I have deleted the newer thread. Refer to this thread for our policy on double-posting.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Patrick |
last post by:
Following earlier discussions about invoking a .NET class library via
..NET-COM Interop (using regasm /tlb) at...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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?
|
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...
|
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...
|
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.
...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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,...
|
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...
|
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...
|
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...
| |