Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Design-Biblioteca
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nico Ramos
Design-Biblioteca
Commits
65383d40
Commit
65383d40
authored
6 months ago
by
mgy20
Browse files
Options
Downloads
Patches
Plain Diff
Muriki foi embora
parent
f6e9b6a4
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
biblioteca.cpp
+8
-18
8 additions, 18 deletions
biblioteca.cpp
with
8 additions
and
18 deletions
biblioteca.cpp
+
8
−
18
View file @
65383d40
...
@@ -48,14 +48,14 @@ int show_options() {
...
@@ -48,14 +48,14 @@ int show_options() {
if
(
cin
.
fail
())
{
if
(
cin
.
fail
())
{
cin
.
clear
();
// Clear the error flag
cin
.
clear
();
// Clear the error flag
cin
.
ignore
(
numeric_limits
<
streamsize
>::
max
(),
'\n'
);
// Ignore the invalid input
cin
.
ignore
(
numeric_limits
<
streamsize
>::
max
(),
'\n'
);
// Ignore the invalid input
cout
<<
"Entrada inválida! Por favor, insira um número entre 1 e 10."
<<
endl
;
cout
<<
"
>
Entrada inválida! Por favor, insira um número entre 1 e 10."
<<
endl
;
continue
;
// Restart the loop
continue
;
// Restart the loop
}
}
// Check if the option is within the valid range
// Check if the option is within the valid range
if
(
option
>=
1
&&
option
<=
10
)
{
break
;
}
// Valid option, exit the loop
if
(
option
>=
1
&&
option
<=
10
)
{
break
;
}
// Valid option, exit the loop
else
{
else
{
cout
<<
"Opção inválida! Por favor, insira um número entre 1 e 10."
<<
endl
;
cout
<<
"
>
Opção inválida! Por favor, insira um número entre 1 e 10."
<<
endl
;
}
}
}
}
...
@@ -126,9 +126,7 @@ int main(){
...
@@ -126,9 +126,7 @@ int main(){
if
(
valor
>
0
)
{
if
(
valor
>
0
)
{
cout
<<
"
\n
Usuario: "
<<
userCPF
<<
endl
;
cout
<<
"
\n
Usuario: "
<<
userCPF
<<
endl
;
cout
<<
"Valor a pagar: "
<<
valor
<<
endl
;
cout
<<
"Valor a pagar: "
<<
valor
<<
endl
;
}
else
{
}
else
{
cout
<<
"> Aviso: Usuario não possui multas"
<<
endl
;
}
cout
<<
"> Aviso: Usuario não possui multas"
<<
endl
;
}
break
;
break
;
case
PAYFEES
:
case
PAYFEES
:
...
@@ -153,9 +151,7 @@ int main(){
...
@@ -153,9 +151,7 @@ int main(){
cout
<<
"Entre com o editora: "
;
getline
(
cin
,
editora
);
cout
<<
"Entre com o editora: "
;
getline
(
cin
,
editora
);
Livro
liv
(
titulo
,
ano
,
autor
,
editora
);
Livro
liv
(
titulo
,
ano
,
autor
,
editora
);
contObras
.
adicionarObra
(
liv
);
contObras
.
adicionarObra
(
liv
);
}
else
{
}
else
{
cout
<<
"Erro: Tipo não recinhecido! Ignorando operação"
<<
endl
;
}
cout
<<
"Erro: Tipo não recinhecido! Ignorando operação"
<<
endl
;
}
break
;
break
;
case
LISTWORKS
:
contObras
.
mostrarDetalhes
();
case
LISTWORKS
:
contObras
.
mostrarDetalhes
();
...
@@ -169,9 +165,7 @@ int main(){
...
@@ -169,9 +165,7 @@ int main(){
}
else
if
(
tipoObra
==
"livro"
)
{
}
else
if
(
tipoObra
==
"livro"
)
{
cout
<<
"Método de busca (titulo|autor): "
;
cout
<<
"Método de busca (titulo|autor): "
;
cin
>>
tipoBusca
;
cin
>>
tipoBusca
;
}
else
{
}
else
{
cout
<<
"Erro: Tipo não reconhecido! Ignorando operação"
<<
endl
;
}
cout
<<
"Erro: Tipo não reconhecido! Ignorando operação"
<<
endl
;
}
//contObras.pesquisarObra(DescricaoObra &descricao);
//contObras.pesquisarObra(DescricaoObra &descricao);
break
;
break
;
...
@@ -191,9 +185,7 @@ int main(){
...
@@ -191,9 +185,7 @@ int main(){
cout
<<
"Entre com o editora: "
;
getline
(
cin
,
editora
);
cout
<<
"Entre com o editora: "
;
getline
(
cin
,
editora
);
Livro
liv
(
titulo
,
ano
,
autor
,
editora
);
Livro
liv
(
titulo
,
ano
,
autor
,
editora
);
contObras
.
solicitarEmprestimo
(
liv
);
contObras
.
solicitarEmprestimo
(
liv
);
}
else
{
}
else
{
cout
<<
"Erro: Tipo não reconhecido! Ignorando operação"
<<
endl
;
}
cout
<<
"Erro: Tipo não reconhecido! Ignorando operação"
<<
endl
;
}
break
;
break
;
case
RETURNWORK
:
case
RETURNWORK
:
...
@@ -212,9 +204,7 @@ int main(){
...
@@ -212,9 +204,7 @@ int main(){
cout
<<
"Entre com o editora: "
;
getline
(
cin
,
editora
);
cout
<<
"Entre com o editora: "
;
getline
(
cin
,
editora
);
Livro
liv
(
titulo
,
ano
,
autor
,
editora
);
Livro
liv
(
titulo
,
ano
,
autor
,
editora
);
contObras
.
devolverEmprestimo
(
liv
);
contObras
.
devolverEmprestimo
(
liv
);
}
else
{
}
else
{
cout
<<
"Erro: Tipo não reconhecido! Ignorando operação"
<<
endl
;
}
cout
<<
"Erro: Tipo não reconhecido! Ignorando operação"
<<
endl
;
}
break
;
break
;
case
FINISH
:
case
FINISH
:
...
@@ -222,7 +212,7 @@ int main(){
...
@@ -222,7 +212,7 @@ int main(){
return
0
;
return
0
;
default
:
default
:
cout
<<
"Comando não reconhecido!"
<<
endl
;
cout
<<
"
>
Comando não reconhecido!"
<<
endl
;
break
;
break
;
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment