Advertisement
Guest User

Untitled

a guest
Mar 24th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. import java.util.HashMap;
  2. import java.util.Map;
  3. public class ClubeDoLivro {
  4.  
  5. private Map<String, Livro> livros;
  6.  
  7. public ClubeDoLivro() {
  8. livros = new HashMap<String, Livro>();
  9. }
  10.  
  11. public void adicionaLivro(String titulo, String autor, int ano, String isbn) throws Exception{
  12. if (livros.containsKey(isbn)){
  13. throw new Exception("Livro ja pertence ao acervo.");
  14. } else {
  15. Livro livro = new Livro(titulo, autor, ano, isbn);
  16. livros.put(isbn, livro);
  17. }
  18. }
  19.  
  20. public void importaLivros(String filename) throws Exception{
  21. }
  22.  
  23. public Livro buscaLivro(String isbn) throws Exception {
  24. return null;
  25. }
  26.  
  27. public void adicionaOpiniao(String isbn, int nota, String autor, String comentario) throws Exception {
  28. }
  29.  
  30. public double getNotaGeral(String isbn) throws Exception {
  31. return 0.0;
  32. }
  33.  
  34. public void listaOpinioes(String isbn) throws Exception{
  35. }
  36.  
  37. public void ranking(int n) throws Exception{
  38. }
  39.  
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement