// Attached: Lab_10_Part1
// ===========================================================
// File: Lab_10_Part1
// ===========================================================
// Programmer: Elaine Torrez
// Class: CMPR 121
// ===========================================================

#include <iostream>
#include <string>
using namespace std;

class Book
{
private:
    string isbn;
    int year;
    double price;
    static int bookCount;

public:
    Book()
    {
        isbn = "";
        year = 0;
        price = 0.0;
        bookCount++;
    }

    Book(string bookIsbn, int bookYear, double bookPrice)
    {
        isbn = bookIsbn;
        year = bookYear;
        price = bookPrice;
        bookCount++;
    }

    void displayBook() const
    {
        cout << "ISBN:  " << isbn << endl;
        cout << "Year:  " << year << endl;
        cout << "Price: " << price << endl;
    }

    int getCount()
    {
        return bookCount;
    }
};

int Book::bookCount = 0;

int main()
{
    Book bookOne("0-12345-9", 1990, 12.50);
    Book bookTwo("0-54321-9", 2001, 7.75);
    Book bookThree;

    cout << "Here is book #1:\n";
    bookOne.displayBook();

    cout << endl;
    cout << "Here is book #2:\n";
    bookTwo.displayBook();

    cout << endl;
    cout << "There are " << bookOne.getCount() << " books.\n";

    return 0;
}