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.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

In java Create a class called  Author with the following attributes and methods:

Here is the file: bookData  

Book, Author, Address, Price, category
Algorithms to Live By,Christian and Griffiths,New York, 14.59,Programming
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. 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY