diff --git a/Makefile b/Makefile index ffbcf9faf82b75750eebbeed58218fadaf8cf741..0f4caaeac024b243de3a80445b314262beac6b13 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ CXXFLAGS = -Wall -O2 LDLIBS = -lm SRC = $(wildcard ./sources/*.cpp) OBJ = $(SRC:.c=.o) -TARGET = main +TARGET = biblioteca all: $(TARGET) diff --git a/main.cpp b/biblioteca.cpp similarity index 81% rename from main.cpp rename to biblioteca.cpp index ce127e7939c08a3ecc01553573a63bfb8340a2fb..7c285768a8e23875e083442843586a77357c706c 100644 --- a/main.cpp +++ b/biblioteca.cpp @@ -63,31 +63,6 @@ int show_options() { } -//int show_options () { -// int option; -// while (true) { -// cout << endl; -// cout << "> Entre com um comando:" << endl; -// cout << "1 - Cadastrar usuario " << endl; -// cout << "2 - Listar usuarios " << endl; -// cout << "3 - Listar multas de um usuario " << endl; -// cout << "4 - Pagar multas de um usuario " << endl; -// cout << "5 - Adicionar uma Obra " << endl; -// cout << "6 - Listar Obras " << endl; -// cout << "7 - Pesquisar Obra " << endl; -// cout << "8 - Emprestar Obra " << endl; -// cout << "9 - Devolver Obra " << endl; -// cout << "10 - Finalizar programa " << endl; -// cout << "-> "; -// cin >> option; -// if (option >= 1 && option <= 10) -// break; -// } -// -// return option; -//} - - int main(){ system("clear"); @@ -131,10 +106,19 @@ int main(){ int option = START; while (option != FINISH) { option = show_options(); - string userCPF; int valor; + string nome, userCPF, endereco, telefone, email; + string tipoObra; + int valor; switch (option) { case ADDUSER: + cout << "Entre com o nome: "; cin >> nome; + cout << "Entre com o CPF: "; cin >> userCPF; + cout << "Entre com o endereco: "; cin >> endereco; + cout << "Entre com o telefone: "; cin >> telefone; + cout << "Entre com o email: "; cin >> email; + if (contUsuarios.adicionarUsuario(nome, userCPF, endereco, telefone, email)) + cout << "> Usuario adicionado com sucesso!" << endl; break; case LISTUSERS: @@ -159,6 +143,7 @@ int main(){ break; case ADDWORK: + //contObras.adicionarObra(DescricaoObra &descricao); break; case LISTWORKS: @@ -166,12 +151,21 @@ int main(){ break; case QUERYWORK: + cout << "Entre com o tipo da obra: "; cin >> tipoObra; + if (tipoObra == "periodico") { + cout << "Alguma coisa"; + } else if (tipoObra == "livro") { + cout << "Alguma coisa"; + } + //contObras.pesquisarObra(DescricaoObra &descricao); break; case BORROWWORK: + //contObras.solicitarEmprestimo(DescricaoObra &descricao); break; case RETURNWORK: + //contObras.devolverEmprestimo(DescricaoObra &descricao); break; case FINISH: diff --git a/main b/main deleted file mode 100755 index d32b3c90d9ee0db0d622a7dbaea0452a0698ac21..0000000000000000000000000000000000000000 Binary files a/main and /dev/null differ