Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
jesus morales villegas
/
diseno_software
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a890b345
authored
Dec 27, 2023
by
jesus morales villegas
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
comprobar sacar libro terminado
parent
7621768c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
3 deletions
src/Biblioteca.java
src/Catalogo.java
src/Ejemplar.java
src/Biblioteca.java
View file @
a890b345
...
...
@@ -56,7 +56,11 @@ public class Biblioteca {
throw
new
UnsupportedOperationException
();
}
public
Boolean
ComprobarSacarLibro
(
Integer
aISBN
)
{
throw
new
UnsupportedOperationException
();
public
Boolean
ComprobarSacarLibro
(
Integer
ISBN
)
{
if
(
_unnamed_Catalogo_18
.
_controla
.
containsKey
(
ISBN
)){
Ejemplar
ejemplar
=
_unnamed_Catalogo_18
.
_controla
.
get
(
ISBN
);
return
!
ejemplar
.
get_estado
().
equals
(
"deteriorado"
)
&&
ejemplar
.
get_numReservas
()
==
0
;
}
else
return
false
;
}
}
\ No newline at end of file
src/Catalogo.java
View file @
a890b345
import
java.util.HashMap
;
public
class
Catalogo
{
private
Integer
_numeroLibros
;
private
Boolean
_librosMalEstado
;
public
Biblioteca
_unnamed_Biblioteca_24
;
public
Libro
_controla
;
public
HashMap
<
Integer
,
Ejemplar
>
_controla
;
}
\ No newline at end of file
src/Ejemplar.java
View file @
a890b345
...
...
@@ -20,4 +20,20 @@ public class Ejemplar extends Libro {
public
void
ActualizarEstadoLibro
()
{
throw
new
UnsupportedOperationException
();
}
public
String
get_estado
()
{
return
_estado
;
}
public
void
set_estado
(
String
_estado
)
{
this
.
_estado
=
_estado
;
}
public
Integer
get_numReservas
()
{
return
_numReservas
;
}
public
void
set_numReservas
(
Integer
_numReservas
)
{
this
.
_numReservas
=
_numReservas
;
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment