Advertisement
CR7CR7

ParsingAPIXML

May 20th, 2022
706
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Book {    
  2.         private String title;
  3.         private String author;
  4.         private int publicationYear;
  5.         private double averageRating;
  6.         private int ratingsCount;
  7.         private String imageUrl;
  8.        
  9.         // Add getters & setters for author, averageRating, and ratingsCount
  10.        
  11.         public String getTitle() {
  12.             return title;
  13.         }
  14.         public void setTitle(String title) {
  15.             this.title = title;
  16.         }
  17.        
  18.         public int getPublicationYear() {
  19.             return publicationYear;
  20.         }
  21.         public void setPublicationYear(int publicationYear) {
  22.             this.publicationYear = publicationYear;
  23.         }
  24.        
  25.         public String getImageUrl() {
  26.             return imageUrl;
  27.         }
  28.         public void setImageUrl(String imageUrl) {
  29.             this.imageUrl = imageUrl;
  30.         }
  31.     }
Advertisement
RAW Paste Data Copied
Advertisement