I am enclosing my code and as you can see below the Event Recorded Banner the event type will not display. I would appreciate if you could show me what my problem may be. Everything else works properly. I am stuck.

#include <iomanip>
#include <cmath>
#include "EventBooker.h"

EventBooker::EventBooker()
{	
displayForm();
}

// setters
void EventBooker::setEventName(string name)			  {eventName = name;}
void EventBooker::setEventTime(string time)			  {eventTime = time;}
void EventBooker::setEventLocation(string location)   {eventLocation = location;}
void EventBooker::setEventType(string type)			  {eventType = type;}
void EventBooker::setEventBookingFee(double fee)	  {eventBookingFee = fee;}

// getters
string EventBooker::getEventName()		  {return eventName;}
string EventBooker::getEventTime()		  {return eventTime;}
string EventBooker::getEventLocation()	  {return eventLocation;}
string EventBooker::getEventType()		  {return eventType;}
double EventBooker::getEventBookingFee()  {return eventBookingFee;}

void EventBooker::displayForm()

{
string input;
double input1;

cout<<"===============>     Hot Rod's Booking System     <=============== \n\n";

cout<<" Enter the name of the event:   \t";
getline(cin, input);
setEventName(input);

cout<<" Enter the time of the event:   \t";
getline(cin, input);
setEventTime(input);

cout<<" Enter Location of the event:   \t";
getline(cin, input);
setEventLocation(input);

cout<<" Enter the Fees of the event:    \t";
cin>>input1;
setEventBookingFee(input1);

   if(eventBookingFee>=1 && eventBookingFee<30)
       cout<<" 10 foot jump"<<endl;
   else if(eventBookingFee>=31 && eventBookingFee<40)
        cout<<" 20 foot jump"<<endl;
   else if(eventBookingFee>=41 && eventBookingFee<60)
        cout<<" 20 foot jump with fireworks"<<endl;
   else if(eventBookingFee>=61 && eventBookingFee<74)
        cout<<" 30 foot jump"<<endl;
   else if(eventBookingFee>=74 && eventBookingFee<100)
	    cout<<" 40 foot jump ofer a pool with ambulance ready"<<endl;
   else if(eventBookingFee>100)
	    cout<<" Price range out of criteria"<<endl;
   else cout<<"Error:  Invalid entry.  Entry out of range \n";

 }

void EventBooker::displayEventInformation()
{
	
	cout<<"\n\n\n******************************  EVENT RECORDED   ****************************** \n\n";
	cout<<" Event Name:\t\t"<<getEventName()<<endl;
	cout<<" Event Time:\t\t"<<getEventTime()<<endl;
	cout<<" Event Location:\t"<<getEventLocation()<<endl;
	cout<<" Event Fees:\t\t $"<<setprecision(2)<<fixed<<getEventBookingFee()<<endl;
	cout<<" Event Type:\t\t"<<getEventType()<<endl;
	cout<<"\n\n\n ================================================================= \n\n";
	
	}
Member Avatar for iamthwee

It might be worth while posting the contents of "EventBooker.h"

Member Avatar for iamthwee

Hi,

please don't send me private message in the future as I tend to ignore them.

Here is the code you gave me:

#include <iomanip>
#include <iostream>
#include <cmath>
#include <string>

using namespace std;

//#include "EventBooker.h"
class EventBooker
{
private:
// data members
  string eventName, eventTime, eventLocation, eventType;
  double eventBookingFee;

public:
// constructor
  EventBooker ();

//setters
  void setEventName ( string name );
  void setEventTime ( string time );
  void setEventLocation ( string location );
  void setEventType ( string type );
  void setEventBookingFee ( double fee );
//void displayForm();

//getters
  string getEventName();
  string getEventTime();
  string getEventLocation();
  string getEventType();
  double getEventBookingFee();

  string getdisplayForm();

//member function
  void displayForm();
  void displayEventInformation();

}; 



EventBooker::EventBooker()
{
  displayForm();
}

// setters
void EventBooker::setEventName ( string name )
{
  eventName = name;
}
void EventBooker::setEventTime ( string time )
{
  eventTime = time;
}
void EventBooker::setEventLocation ( string location )
{
  eventLocation = location;
}
void EventBooker::setEventType ( string type )
{
  eventType = type;
}
void EventBooker::setEventBookingFee ( double fee )
{
  eventBookingFee = fee;
}

// getters
string EventBooker::getEventName()
{
  return eventName;
}
string EventBooker::getEventTime()
{
  return eventTime;
}
string EventBooker::getEventLocation()
{
  return eventLocation;
}
string EventBooker::getEventType()
{
  return eventType;
}
double EventBooker::getEventBookingFee()
{
  return eventBookingFee;
}

void EventBooker::displayForm()
{
  string input;
  double input1;

  cout << "===============>     Hot Rod's Booking System     <=============== \n\n";

  cout << " Enter the name of the event:   \t";
  getline ( cin, input );
  setEventName ( input );

  cout << " Enter the time of the event:   \t";
  getline ( cin, input );
  setEventTime ( input );

  cout << " Enter Location of the event:   \t";
  getline ( cin, input );
  setEventLocation ( input );

  cout << " Enter the Fees of the event:    \t";
  cin >> input1;
  setEventBookingFee ( input1 );

  if ( eventBookingFee >= 1 && eventBookingFee < 30 )
    cout << " 10 foot jump" << endl;
  else if ( eventBookingFee >= 31 && eventBookingFee < 40 )
    cout << " 20 foot jump" << endl;
  else if ( eventBookingFee >= 41 && eventBookingFee < 60 )
    cout << " 20 foot jump with fireworks" << endl;
  else if ( eventBookingFee >= 61 && eventBookingFee < 74 )
    cout << " 30 foot jump" << endl;
  else if ( eventBookingFee >= 74 && eventBookingFee < 100 )
    cout << " 40 foot jump ofer a pool with ambulance ready" << endl;
  else if ( eventBookingFee > 100 )
    cout << " Price range out of criteria" << endl;
  else cout << "Error:  Invalid entry.  Entry out of range \n";

}

void EventBooker::displayEventInformation()
{

  cout << "\n\n\n******************************  EVENT RECORDED   ****************************** \n\n";
  cout << " Event Name:\t\t" << getEventName() << endl;
  cout << " Event Time:\t\t" << getEventTime() << endl;
  cout << " Event Location:\t" << getEventLocation() << endl;
  cout << " Event Fees:\t\t $" << setprecision ( 2 ) << fixed << getEventBookingFee() << endl;
  cout << " Event Type:\t\t" << getEventType() << endl;
  cout << "\n\n\n ================================================================= \n\n";

}

int main()
{
    EventBooker test; //create a test object
    test.displayForm();
    
    cin.get();
}

Your question refers to a 'Recorded Banner' have you accidentally forgot to post that because I cannot see any reference to it in the code you gave me?

This is one of the few times that I have used this web site. I am disappointed in the fact that I am looking for some help. I submitted a post called "GETTERS". I am very new to C++ and I was wanting to learn it. I turned to the site because it was recommended to me in the event I needed some help.

I am not asking anyone to write the entire code for me. All I was asking was some help with a small section of it because I did not know how to correct my problem. I welcome any suggestions to my problem.

I would appreciate some help from anyone who can help me.

Greg

This is one of the few times that I have used this web site. I am disappointed in the fact that I am looking for some help. I submitted a post called "GETTERS". I am very new to C++ and I was wanting to learn it. I turned to the site because it was recommended to me in the event I needed some help.

I am not asking anyone to write the entire code for me. All I was asking was some help with a small section of it because I did not know how to correct my problem. I welcome any suggestions to my problem.

I would appreciate some help from anyone who can help me.

Greg

You got a response to your thread from iamthwee, along with a question from him, which you never responded to. Answer the question and probably repost the entire program so it is all there, and go from there.

commented: cheers +18

You got a response to your thread from iamthwee, along with a question from him, which you never responded to. Answer the question and probably repost the entire program so it is all there, and go from there.

Thank you for your attempt. However, I figured out the problem on my own.

Thank you for your attempt. However, I figured out the problem on my own.

lol? You never even posted problem to begin with.

Please don't create a new thread just to rant about something.

Member Avatar for iamthwee

I'm not entirely sure what the OP is complaining about.

If you re-read your post you will have realised you must have missed some of the code you were asking about. Hence why I asked the question if you missed a bit out when you posted it.

Second, I wasn't being rude by not replying to you by private email.

Most of the regulars here don't reply to private messages and prefer to answer questions directly on the forum simply because if we make a mistake, somebody else will spot that and correct it.

Most of the regulars here don't reply to private messages and prefer to answer questions directly on the forum simply because if we make a mistake, somebody else will spot that and correct it.

I never ever make mistakes :) I was wrong only once in my life, that when the time I thought I was wrong, but I was wrong about that.

Member Avatar for iamthwee

Hell I make mistakes all the time, if I said I didn't I would only be pretending.

And those that say they don't make mistakes are simply entertaining a grandiose notion of superiority which is more often than not ill founded. That goes for you too Ancient Dragon :P

Hello,

With me being new at c++ I sometimes get a bit overwhelmed by it all. I never meant to be insulting to you or anyone. I, in fact, am very much envious of your expertise and respcect you.

I am just needing some help with an area of the programmming that I did. I have a problem with an particular part of the code that I wish to gain some help from someone who knows more about it than I do.

No hard feeling!!! Ok?

I would appreciate it you could look at what I have done today, which will clarify the area of concern.


Greg022549

Hello,

With me being new at c++ I sometimes get a bit overwhelmed by it all.

Yes, we all have been there and done that. We we understand your pain.

I never meant to be insulting to you or anyone.

No offense taken, so don't worry about it.

I, in fact, am very much envious of your expertise and respcect you.

You'll get there too. Just takes a lot of practice and patients.


I would appreciate it you could look at what I have done today, which will clarify the area of concern.

I would, but you haven't posted any code today, and my eyesight isn't good enough to see your monitor :)

Hello,

With me being new at c++ I sometimes get a bit overwhelmed by it all. I never meant to be insulting to you or anyone. I, in fact, am very much envious of your expertise and respcect you.

I am just needing some help with an area of the programmming that I did. I have a problem with an particular part of the code that I wish to gain some help from someone who knows more about it than I do.

No hard feeling!!! Ok?

I would appreciate it you could look at what I have done today, which will clarify the area of concern.


Greg022549

It's cool. No harm done. But I am confused. What are we supposed to look at? You had said that you had figured it out earlier. If there is code, please post the most recent code and state the updated problems. Thanks.

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.