Course Solutions Uncategorized (Solved) : Need Q1 Q2 Bookh Ifndef Bookh Define Bookh Two Lines Preprocessor Directives One End Endif Q27757618 . . . .

(Solved) : Need Q1 Q2 Bookh Ifndef Bookh Define Bookh Two Lines Preprocessor Directives One End Endif Q27757618 . . . .

 

Just need Q1 and Q2

-BOOK.h

#ifndef _BOOK_H_

#define _BOOK_H_

// These two lines of preprocessor directives, and the one atthe end #endif,  

// prevent the header file from being included (linked in)multiple times,

// when it is used multiple times by the user.

#include “Buy.h”

#include <string>

using namespace std;

class Book {

private:

string title, author; // private local variables

float price;

public:

Book(string,string,float); // constructor

Buy *buys; // linked list of buy

// accessor methods

string getTitle();

string getAuthor();

float getPrice();

void setTitle(string);

void setAuthor(string);

void setPrice(float);

// class methods

void buyBook(string date);

string displayBought();

int timesBought();

string toString();

};

#endif // _BOOK_H_

BUY.h

#ifndef _BUY_H_

#define _BUY_H_

// These two lines of preprocessor directives, and the one atthe end: #endif,  

// prevent the header file from being included (linked in)multiple times,

//

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post