#include "ksiazka.h"
#include <iostream>
#include <cstring>

using namespace std;

void book::nowaKsiazka()
{
    cout << "Prosze podac tytul: ";
    cin.get();
    cin.getline( tytul, 999 );
    cout << "Prosze podac imie autora: ";
    cin.getline( autor_imie, 19 );
    cout << "Prosze podac nazwisko autora: ";
    cin.getline( autor_nazw, 49 );
    cout << "Prosze podac wydawnictwo: ";
    cin.getline( wydawnictwo, 29 );
    cout << "Prosze podac rok wydania: ";
    cin >> rok_wyd;
    cout << "Prosze podac cene: ";
    cin >> cena;

}

void book::write_title(char* t)
{
    strcpy(tytul, t);
}

char* book::read_title()
{
    return tytul;
}

void book::write_nazw(char* an)
{
    strcpy(autor_nazw, an);
}

char* book::read_nazw()
{
    return autor_nazw;
}

void book::write_imie(char* ai)
{
    strcpy(autor_imie, ai);
}

char* book::read_imie()
{
    return autor_imie;
}

void book::write_wyd(char* wyd)
{
    strcpy(wydawnictwo, wyd);
}

char* book::read_wyd()
{
    return wydawnictwo;
}

void book::write_cena(int c)
{
    cena = c;
}

int book::read_cena()
{
    return cena;
}

void book::write_rok(int r)
{
    rok_wyd = r;
}

int book::read_rok()
{
    return rok_wyd;
}


