Study the scenario and complete the question(s) that follow: Pearson Institute of Higher Education Library Books The Pearson Institute Library is comprised of many books covering various subjects. Students borrow these books to aid them in their studies. The Pearson Library team would like to know the ten most borrowed books by students. They have approached you as a Java Developer to help them to develop an app that will provide them with these statistics. They keep records of the borrowed books and the number of times they have been borrowed. Below is sample data from the Books.txt file that you have been provided with: Sample data – Books.txt Introduction to Java programming; Daniel Liang; 25 The C# Programming Yellow Book; Robert Miles; 12 Learning Python; David Ascher; 10 The C++ Programming Language; Bjarne Stroustrup; 21 Programming PHP; Rasmus Lerdorf; 15 Create a Java application for the Pearson Library. The application must consist of a Book class that is composed of the book properties mentioned in the above scenario. The program must parse through the file and read all the properties (Book name, Author and number of times book has been borrowed) and add them to an ArrayList. The program should then find the top 10 most borrowed books and write these books in a file called MyBookList.txt in the following format: “Book Name – Book Artist”. The books should be written line by line. Ensure that the application handles basic exceptions. (30 Marks)
Study the scenario and complete the question(s) that follow:
Pearson Institute of Higher Education Library Books
The Pearson Institute Library is comprised of many books covering various subjects. Students borrow these books to aid them in their studies. The Pearson Library team would like to know the ten most borrowed books by students. They have approached you as a Java Developer to help them to develop an app that will provide them with these statistics. They keep records of the borrowed books and the number of times they have been borrowed. Below is sample data from the Books.txt file that you have been provided with:
Sample data – Books.txt
Introduction to Java
The C# Programming Yellow Book; Robert Miles; 12
Learning Python; David Ascher; 10
The C++ Programming Language; Bjarne Stroustrup; 21
Programming PHP; Rasmus Lerdorf; 15
Create a Java application for the Pearson Library. The application must consist of a Book class that is composed of the book properties mentioned in the above scenario. The program must parse through the file and read all the properties (Book name, Author and number of times book has been borrowed) and add them to an ArrayList. The program should then find the top 10 most borrowed books and write these books in a file called MyBookList.txt in the following format: “Book Name – Book Artist”. The books should be written line by line. Ensure that the application handles basic exceptions. (30 Marks)
Step by step
Solved in 2 steps with 2 images