4. Pick 2 methods below to add functionalities to the BookStore class. a. Find the most expensive book (if there are 2 books have the same price, return one of them) public Book getMostExpensiveBook () b. Find the books by a price range (include low and high) public ArrayList
getBooksForPriceRange(double low, double high) C. Add a list of new books to the store book list public void addBooks (ArrayList newBooks) d. Apply discount to all the books (holiday sales event) public void applyDiscountToAllBooks (double discount) I 5. Extra credit: Sort the booklist by price (low -> high) 6. Add code in BookStore Manager class to test your new methods. Feel free to change the data in book list to test different scenarios import java.util.ArrayList; public class BookStoreManager ! @param args the command line arguments public static void main(String[] args) { 1/ create a bookstore Bookstore mystore - new Bookstore(); w initialize books mystore.getBooklist().add(new Book "Intro to Java", "James", 56.99 ) ) :| mystore.getBooklist() .add(new Book( 'Advanced Java", "Green") 65.99 ) ): mystore.getBooklist() .add(new Book "Jaya Sertlets", "Brown", 75.99 ) ): mystore.getBooklist() .add(new Book ( "Into HTML", James". 29.49 ) ): mystore.getBooklist() .add(new Book ( "Intro to Flash", "James", 34.99 ) ); mystore.getBooklist().add( new Book ( "Advanced HTML", "Green", 56.99 ) ): mystore.getBooklist().trimToSize(): W printout the book mystore.printoutBooklist: W search for the boat with a ArrayList booklist; public BookStore () { booklist = new ArrayList 0); 3 public void printoutBookList() { System.out.println("----- My book store has ==--=-"); for (Book abook : booklist) { System.out.println(abook); System.out.println("- } public void printoutBooklist (ArrayList mylist) { System.out.println("My book list has ---- for (Book abook : mylist) { System.out.println(abook): > System.out.println(". 3 public ArrayList searchForTitle( String searchString ) { ArrayList(); Book aBook; for (int i =0; i getBooklist() { return booklist; > public void setBooklist (ArrayList booklist) { this.booklist booklist: 1 ) public class Book 1 private String title: private String author; private double price: public Book() > public Book (String myTitle, String myAuthor, double myprice) { title = myTitle: author = myAuthor: price - myprice; I public String toString() return getTitle() + " written by + getAuthor() + ", price is " + this.price: > 3 public double getPrice() return price? public void serPrice (double myPrice) price = myPrice: 1 public String getTitle() { return title: public String toString() [ return getTitle() + " written by " + getAuthor() + ", price is " + this.price; ) public double getPrice () { return price: ) public void serPrice (double myPrice) price - myPrice: 1 public String getTitle() { return title; I 1 public void setTitle(String title) this.title title: } public String getAuthor() { return author; public void setAuthor (String author) his.author = author: }