How can i make this Method- isFree () - returns true if the book is free
public class AudioBook extends Book { private String readerName; LocalTime recordDuration; private int priceForDownload; public AudioBook(String bookName, String bookAuthor, LiteratureGenre bookGenre, Locale bookLanguage, LocalDate bookDateOfMade,String readerName, LocalTime recordDuration, int priceForDownload) { super(bookName,bookAuthor,bookGenre, bookLanguage,bookDateOfMade); this.readerName = readerName; this.recordDuration = recordDuration; this.priceForDownload = priceForDownload; }
public boolean isFree() { return priceForDownLoad == 0; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)