Skip to content
Snippets Groups Projects
Commit a3eed20a authored by Nico's avatar Nico
Browse files

Merge branch 'main' of gitlab.c3sl.ufpr.br:mgy20/Design-biblioteca

parents 0b0355ce f6b8c154
Branches
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ CXXFLAGS = -Wall -O2 ...@@ -3,7 +3,7 @@ CXXFLAGS = -Wall -O2
LDLIBS = -lm LDLIBS = -lm
SRC = $(wildcard ./sources/*.cpp) SRC = $(wildcard ./sources/*.cpp)
OBJ = $(SRC:.c=.o) OBJ = $(SRC:.c=.o)
TARGET = main TARGET = biblioteca
all: $(TARGET) all: $(TARGET)
......
...@@ -63,31 +63,6 @@ int show_options() { ...@@ -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(){ int main(){
system("clear"); system("clear");
...@@ -131,10 +106,19 @@ int main(){ ...@@ -131,10 +106,19 @@ int main(){
int option = START; int option = START;
while (option != FINISH) { while (option != FINISH) {
option = show_options(); option = show_options();
string userCPF; int valor; string nome, userCPF, endereco, telefone, email;
string tipoObra;
int valor;
switch (option) { switch (option) {
case ADDUSER: 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; break;
case LISTUSERS: case LISTUSERS:
...@@ -159,6 +143,7 @@ int main(){ ...@@ -159,6 +143,7 @@ int main(){
break; break;
case ADDWORK: case ADDWORK:
//contObras.adicionarObra(DescricaoObra &descricao);
break; break;
case LISTWORKS: case LISTWORKS:
...@@ -166,12 +151,21 @@ int main(){ ...@@ -166,12 +151,21 @@ int main(){
break; break;
case QUERYWORK: 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; break;
case BORROWWORK: case BORROWWORK:
//contObras.solicitarEmprestimo(DescricaoObra &descricao);
break; break;
case RETURNWORK: case RETURNWORK:
//contObras.devolverEmprestimo(DescricaoObra &descricao);
break; break;
case FINISH: case FINISH:
......
File deleted
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment