
In java Create a class called Author with the following attributes and methods:
Here is the file: bookData
Book, Author, Address, Price, category
Computer Science, David Reed, New York, 78.99,Computer Science
Introduction to Java, Daniel Liang, Chicago, 117.56, Java
Simply Java, Harvey Deitel,Boston, 23.49, Java
name : String
address : String
all getters
all setters
default constructor
second constructor with name and address as parameters
copy constructor
equals()
toString()
Create a class called Book with the following attributes and methods:
author : Author
category : String
price : double
name: String
all getters
all setters
default constructor
second constructor with author, category, price as parameters
copy constructor
equals()
toString()
reducePrice(percentage : double) - Create a method to be able to take the price and reduce it by a percentage of the total current price and print that out. You have direct access to that price.
Create a BookUtilities class with the following methods:
readAllBookData(books : ArrayList<Book>) - creates the ArrayList from the data file bookdata.txt Preview the document
displayAllBookData(books : ArrayList<Book>) - displays the ArrayList, nicely formatted
searchForCategory(books : ArrayList<Book>) - displays the Book object with a certain category passed in, search on a substring of the category.
searchForBook(books: ArrayList<Book>) - displays the Book object on a book that starts with a certain letter or few letters.
searchByPrice (books : ArrayList<Book>, double minPrice) - displays all Books with maxPrice price and below. So if I enter $30, it will list book <= $30.
sortyByAuthor((books : ArrayList<Book>) : Sort the books by author, maybe a choice of ascending versus descending
Create an application that will :
Create an ArrayList of Book objects
call readAllBookData()
call displayAllBookData()
call searchByCategory() - the search comes from user input
call searchByPrice - the price comes from user input
call sortByAuthor - The information about the books is sorted by author NOTE: You may have some scrubbing of the file to do. Please do not use the Collections Class to sort.

Trending nowThis is a popular solution!
Step by stepSolved in 5 steps

- // The language is java please do question #9arrow_forwardUSING ENCAPSULATION IN JAVA Create Class designed to describe a home. and provide at least 3 classes. The purpose of each classes varies depending how it will describe a home. It may have class designed to describe what are the names of a family members and can tells if it is the father, mother, siblings and/or 2nd child, 3rd child. may have class designed to describe your house, for example the color of a house, how many floors. It may have class designed to describe the activities at home like at what time to eat for lunch, what time to wash dishes. It and anything that helps you to describe a home by designing a class.arrow_forwardJava Questions - Based on each code, which answer out of the choices "A, B, C, D, E" is correct. Each question has one correct answer. Thank you. Part 1 - 6. Given the following code, the output is __. class Apple { int x = 15; }class Banana extends Apple { int x = 25; }public class Sample {public static void main(String[] args) {Apple a1 = new Banana();System.out.println(a1.x);}} A. Compiler errorB. 25C. 15D. 0E. None of the options Part 2 - 7. Which is possibly a composite class? class Seed { ... }class Fruit { Seed s1 = new Seed(); }class Apple extends Fruits { ... }class Orange extends Apple { ... }class ApplePie { ApplePie a1 = new ApplePie(); } A. FruitB. AppleC. ApplePieD. OrangeE. Seed Part 3 - 10. Given the following code, which statement is true? class Water() { ... }class Juice() extends Water { ... }class Apple() { ... }class ApplePie() { Apple a1 = new Apple(); }class AppleJuice() { Apple a1 = new Apple(); Water w1 = newWater(); } A. Juice is a superclass and Water is a…arrow_forward
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY





