create a software using object oriented programming for a dentist that maintains data for his patients along with their history.
application should be capable of storing, modifying and displaying data. provide a menu driven solution.
plz frndz i need this code urgntl

You need a full system built for this which is no small task and requires much more details than what you provided. Perhaps your dentist should hire a team to build this. Just my opinion.

no i need jus mini application 4 to 5 data members and 3 above mentioned function...

OK, good luck.

here is the code plz add further things

e is the code
class patient
{

private:
int p_id;
char name(20);
int age;
char adress(50);
int phone_no;
char history(100);
char last_appointment(20);
char next_appointment(20);
public:
patient();

void get_data();
void display_data();
void modify_data();

};
#include<stdio,h>
#include<conio.h>
#include<string.h>
#include<windows.h>
using namespace std
#include"patient.h"

void patient.patient()
{
p_id=0;

}

void patient::get_data()
int n;
cout<<"enter the number of the patients"<<endl;
cin>>n;
patient p[10];
for(int i=0; i<n; i++)
{
cout<<"\nEnter Patient ID=\n";
cin>>p_id;
cout<<"Enter Name of Patient=";
cin>>p[i].name;
cout<<"\nEnter Age of Patient=\n";
cin>>p[i].age;
cout<<"\nEnter Address of Patient";
cin>>[pi]adress;
cout<<"\nEnter Contect No.=\n";
cin>>p[i].phone_no;
cout<<"Enter History of Patient=";
cin>>p[i].history;
cout<<"Enter Last visit of Patient=";
cin>>p[i].last_appointment;

cout<<"Enter Next visit date of Patient=";
cin>>p[i].next_appointment;
}


void patient::display_data()
{
cout <<"\n\n;
cout << "\t\t====== PATIENT INFORMATION SYSTEM ======";
cout << "\n\n";
cout<<"\nPatient Name="<<p[i].name<<endl;
cout<<"\nPatient ID="<<p[i].p_id;
cout<<"\nPatient Address="<<p[i].adress;
cout<<"\nContect Number="<<p[i].phone_no;
cout<<"\nPatient Medical History="<<p[i].history;
cout<<"\nLast visit of Patient="<<p[i].last_appointment;
cout<<"\nNext Appointment="<<p[i].next_appointment;
cout<<"\t\t=========End================";
}

void patient::modify_data()
{
cout<<"\nEnter Patient ID=\n";
cin>>p_id;
cout<<"Enter Name of Patient=";
cin>>name;
cout<<"\nEnter Age of Patient=\n";
cin>>age;
cout<<"\nEnter Address of Patient";
cin>>adress;
cout<<"\nEnter Contect No.=\n";
cin>>phone_no;
cout<<"Enter History of Patient=";
cin>>history;
cout<<"Enter Last visit of Patient=";
cin>>last_appointment;

cout<<"Enter Next visit date of Patient=";
cin>>next_appointment;
}
#include<iostream.h>
#include<stdio.h>
#include<conio.h>
#include<string.h>
#include<windows.h>
using namespace std
#include"patient.h"
void main()
{
patient p1, p2;
do
{
system("cls");
cout<<"\n\n\n\tMAIN MENU";
cout<<"\n\n\t01. Get_Data";
cout<<"\n\n\t02. Display_Data";
cout<<"\n\n\t03. Modify Data";
cout<<"\n\n\tPlease Select Your Option (1-3) ";
cin>>ch;
switch(ch)

{
case '1': get_data();
break;
case '2': display_data();
break;
case '3': modify_data();
case '4': 
break;

default :cout<<"\a";
}
}while(ch!='4');
return 0;
}
}

plz guys help me out... :(

do the homework yourself. Nobody is going to help you for your homework.

You seem to have most of what you need. Basically you need to implement storage and retrieval. There are several options for this. In this case the simplest is propbably the best, a comma delimited format(.csv). As for the actual file io, there are also several options. Any decent reference should be able to tell you what they are and let you decide.

Further I would suggest using a vector of patients instead of an array.

ahan thanks sir but still i need litl more...

Can you gives us at least some idea of what you need? Aside from code, that is - no one here is going to give you a working program, gratis, without you providing the majority of the work. DaniWeb is not a homework-completion service, and if that is what you are looking for, I suggest going somewhere else.

What I can do, for now, in the absence of more information, is point out several problems with the code as given:
* The code is completely lacking in indentation. While different indent styles are acceptable, so long as they are used consistently, a lack of indentation is never acceptable in C++.
* You dropped the semi-colon after the using namespace std directive, which is a syntax error.
* You used parentheses in declaring arrays, where you should have used square brackets.
* You declared the main() function as void, which is unequivocally wrong in C++. I don't care if the compiler accepts it, it violates the C++ standard and should never be used. Always declare main() as type int, and return a value at the end (usually zero, which indicates a successful run of the program to the shell).
* You used the older style of header names. In C++ after 1998, all C++ standard library headers drop the '.h' extension, and the libraries inherited from C should all begin with the letter 'c'. For example, <iostream.h> is now just <iostream>, while <stdlib.h> is now <cstdlib>. Most compilers no longer accept the older forms in C++ mode at all.
* On the subject of headers, you included several you never used, such as <windows.h> (which is, needless to say, Windows-specific) and <conio.h> (which is obsolete and shouldn't be used in new programs at all). Only include the headeras you actually need.

Oh, and if you please, stop using the text-message abbreviations when posting here. This isn't Twitter; there is no limitation on the size of your posts (or at least none that you are likely to come up against). Clear and coherent communication is paramount in technical discussions, and full sentences are simple courtesy to us all.

commented: He/she's going to find another forum to do all his/her work from him/her +2

oh okay ill try find some otha forum
thanks anyways

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.