Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

declare a class and write a client program that will keep your appointments for

ID: 3632926 • Letter: D

Question

declare a class and
write a client program that will keep your appointments for the month of November.
You may assume that there will be a maximum of 25 appointments and they are stored in the “appointments.dat”.
this is my class and what I have so far but its not working

struct AppType
{
string activity_name;
string date;
string starting_time;
string ending_time;
};
class AppointmentType
{
public:

void Add_appointment(AppType appoint);

void display(ostream& appointment);};
int main()
{AppointmentType get;
ofstream output;
ifstream input;
input.open("appointment.dat");
if(input.fail( ))
{cout<<" input file opening failed. ";
exit(1);
output.open("appointment.dat");
if(output.fail( ))
{cout<<" output file opening failed. ";
exit(1);}

cout<<"Enter the month";
cin>>month;
cout<<"Enter the amount of appointments for the month"<<endl;
AppType
get.Add_appointment(appoint);
get.display()
AppType appointments[25];
void AppointmentType::Add_appointment(AppType appoint);
{for(int i=0;i<size;i++)
{cout<<"Enter the name of the appointment";

cin>>appointments[i].activity_name;
cout<<"Enter the date of the appointment";
cin>>appointments[i].date;
cout<<"Enter the starting time";
cin>>appointments[i].starting_time;
cout<<"Enter the ending time";
cin>>appointments[i].ending_time;
void AppointmentType::display(ostream& appointment)
{for(int i=0;i<size;i++)
appointment<<name[i]<<" on "<<date[i]<<" starting at "<<stime[i]<<" ending at "<<etime[i]<<endl;}

Explanation / Answer

Can you give us an idea of the error codes that you're getting, provided you're still getting errors. I don't see any obvious errors beside your " #include" statement and "using iostream" that should be before you classes.