SlideShare a Scribd company logo
**********************************publicationData.txt**********************************************
**********************************queries.txt************************************************
Purpose The main purpose of this homework is to practice an important data structure, i.e., Map.
In addition, it continues practicing Object-oriented programming (inheritance, abstract classes and
interfaces), input/output, string manipulations, and lists. Instructions Design and implement the
following interface and classes: - Document (interface): Any document must have get methods to
access its title, authors (including first and last names), and year of production. - Publication
(abstract class): A publication is a document that was published. In addition to title, authors and
year, a publication also has a publisher. Implement constructor(s), toString and get methods. You
must put a contract in this class that all subclasses of Publication must implement a
getPageNumbers method (returns the total number of pages of a publication). - Book (class): A
book is a publication that has an ISBN number, a price, and total number of pages. Implement the
constructor(s), toString, and any other mandatory methods. - JournalPaper (class): A journal paper
is a publication that has a journal name, starting and ending page numbers. Implement the
constructor(s), toString and any other mandatory methods. - Main (class): Your main program
tests everything. You must utilize an important data structure, i.e., a map, which simulates a
database to facilitate the lookup process (i.e., given an author, find his/her publications). The keys
of the map are the author names, and the values of the map are lists of publications. In addition to
main method, implement the following helper methods: - add(List authors, Publication p): add the
publication to the database for each author. - initDatabase(File f): read from the publication data
file and initialize the database. - processQueries(File f): read from the query file to perform the
queries/searchs in the databe. Data Format There are two files, i.e., publicationData.txt and
queries. txt1. In both files, each line contains comma separated items.publicationData.txt contains
one publication record per line, and has the following format depending the first column type is a
book or a journal paper: Note that there can be one or more authors. Do not make any assumption
on the maximum number of authors. For example, the followings are two sample publication
records: book, Introduction to Java Programming and Data
Structures,2020,Pearson,9780136520238,123.45,1218, Y. Daniel Liang journal, Visual analysis of
large-scale network anomalies, 2013, IBM, IBM Journal of Research and Development,1,12, Qi
Liao, Lei Shi, Chen Wang queries.txt contains one query per line, and has the following format:
For example, the followings are two sample queries: Y. Daniel Liang, book Qi Liao, journal If an
author and a publication type is found, display all relevant publication information and a total count
of publications. If not found, display not found in database accordingly (see Sample Output).
Sample Output Searching "John Smith" for "book" .... Author: John Smith is not in the database.
Searching "Paul Tyma" for "journal" .... Journal: Title: Survey of O0 Architechures, Authors: [Paul
Tyma], Year: 2003, Publisher: IEEE, Journal of Software Engineering, Pages: 14 Journal: Title:
Stream Functions, Authors: [Paul Tyma, Roger Stephens], Year: 2003, Publisher: IEEE Computer
Society, Journal of Formal Methods, Pages: 71 Journal: Title: Irregular Interactive Stacks, Authors:
[Walter Dosch, Joseph Broy, Paul Tyma], Year: 2007, Publisher: Spinger, Journal of Scientific
Computing, Pages: 234 Author: Paul Tyma has 3 journal publications. Searching "Paul Tyma" for
"book" .... Author: Paul Tyma has no publication in book. Searching "Qi Liao" for "journal" ....
Journal: Title: Preventive portfolio against data-selling ransomware - a game theory of encryption
and deception, Authors: [Zhen Li, Qi Liao], Year: 2022, Publisher: Elsevier, Computers & Security,
Pages: 10 Journal: Title: Network pricing: can both ISP and P2P benefit?, Authors: [Zhen Li, Qi
Liao], Year: 2014, Publisher: John Wiley & Sons, Ltd., Pages: 16 Journal: Title: Analyzing
spatiotemporal anomalies through interactive visualization, Authors: [Tao Zhang, Qi Liao, Lei Shi,
Weishan Dong], Year: 2014, Publisher: MDPI, Informatics, Pages: 25 Journal: Title: Visual
analysis of large-scale network anomalies, Authors: [Qi Liao, Lei Shi, Chen Wang], Year: 2013,
Publisher: IBM, IBM Journal of Research and Development, Pages: 11 Journal: Title: Oniongraph:
Hierarchical topology+attribute multivariate network visualization, Authors: [Lei Shi, Qi Liao,
Hanghang Tong, Yifan Hu, Chaoli Wange, Chuang Lin, Weihong Qian], Year: 2020, Publisher:
Elsevier, Visual Informatics, Pages: 14 Author: Qi Liao has 5 journal publications. Searching "Qi
Liao" for "book".... Book: Title: How to be an awesome professor, Authors: [Qi Liao], Year: 2023,
Publisher: CMU, ISBN: 12345678910, Price: 99.99, Pages: 50 Author: Qi Liao has 1 book
publications.Note you must properly handle all possible exceptions to prevent program crashes.
Please do not hard code absolute file paths that are unique to your computer. Use relative paths
and assume the files are located in the same directory of your program. You do not need to submit
the two data files that you downloaded from Blackboard.

More Related Content

Similar to publicationDatatxt.pdf

CSE3146-ADV JAVA M2.pdf
CSE3146-ADV JAVA M2.pdfCSE3146-ADV JAVA M2.pdf
CSE3146-ADV JAVA M2.pdf
VithalReddy3
 
LITERATURE SURVEY ON BIG DATA AND PRESERVING PRIVACY FOR THE BIG DATA IN CLOUD
LITERATURE SURVEY ON BIG DATA AND PRESERVING PRIVACY FOR THE BIG DATA IN CLOUDLITERATURE SURVEY ON BIG DATA AND PRESERVING PRIVACY FOR THE BIG DATA IN CLOUD
LITERATURE SURVEY ON BIG DATA AND PRESERVING PRIVACY FOR THE BIG DATA IN CLOUD
International Journal of Technical Research & Application
 
India build problem
India build problemIndia build problem
India build problem
ICE CUBE
 
2016 05-20-clariah-wp4
2016 05-20-clariah-wp42016 05-20-clariah-wp4
2016 05-20-clariah-wp4
CLARIAH
 
An Overview of Python for Data Analytics
An Overview of Python for Data AnalyticsAn Overview of Python for Data Analytics
An Overview of Python for Data Analytics
IRJET Journal
 
IOStream.pptx
IOStream.pptxIOStream.pptx
IOStream.pptx
HindAlmisbahi
 
ACOMP_2014_submission_70
ACOMP_2014_submission_70ACOMP_2014_submission_70
ACOMP_2014_submission_70David Nguyen
 
employee turnover prediction document.docx
employee turnover prediction document.docxemployee turnover prediction document.docx
employee turnover prediction document.docx
rohithprabhas1
 
Modern association rule mining methods
Modern association rule mining methodsModern association rule mining methods
Modern association rule mining methods
ijcsity
 
Text mining
Text miningText mining
Text mining
Pankaj Thakur
 
Data structures and algorithms short note (version 14).pd
Data structures and algorithms short note (version 14).pdData structures and algorithms short note (version 14).pd
Data structures and algorithms short note (version 14).pd
Nimmi Weeraddana
 
F21SC Industrial Programming CW2 Data Analytics (35) 20192.docx
F21SC Industrial Programming CW2 Data Analytics (35) 20192.docxF21SC Industrial Programming CW2 Data Analytics (35) 20192.docx
F21SC Industrial Programming CW2 Data Analytics (35) 20192.docx
lmelaine
 
Week14-Multimedia Information Retrieval.pptx
Week14-Multimedia Information Retrieval.pptxWeek14-Multimedia Information Retrieval.pptx
Week14-Multimedia Information Retrieval.pptx
HasanulFahmi2
 
A Document Exploring System on LDA Topic Model for Wikipedia Articles
A Document Exploring System on LDA Topic Model for Wikipedia ArticlesA Document Exploring System on LDA Topic Model for Wikipedia Articles
A Document Exploring System on LDA Topic Model for Wikipedia Articles
ijma
 
Group 3
Group 3Group 3
FDP-faculty deveopmemt program on python
FDP-faculty deveopmemt program on pythonFDP-faculty deveopmemt program on python
FDP-faculty deveopmemt program on python
kannikadg
 
Reengineering PDF-Based Documents Targeting Complex Software Specifications
Reengineering PDF-Based Documents Targeting Complex Software SpecificationsReengineering PDF-Based Documents Targeting Complex Software Specifications
Reengineering PDF-Based Documents Targeting Complex Software Specifications
Moutasm Tamimi
 
Writing a Databases Research Paper
Writing a Databases Research PaperWriting a Databases Research Paper
Writing a Databases Research PaperDamian T. Gordon
 

Similar to publicationDatatxt.pdf (20)

CSE3146-ADV JAVA M2.pdf
CSE3146-ADV JAVA M2.pdfCSE3146-ADV JAVA M2.pdf
CSE3146-ADV JAVA M2.pdf
 
Q046049397
Q046049397Q046049397
Q046049397
 
LITERATURE SURVEY ON BIG DATA AND PRESERVING PRIVACY FOR THE BIG DATA IN CLOUD
LITERATURE SURVEY ON BIG DATA AND PRESERVING PRIVACY FOR THE BIG DATA IN CLOUDLITERATURE SURVEY ON BIG DATA AND PRESERVING PRIVACY FOR THE BIG DATA IN CLOUD
LITERATURE SURVEY ON BIG DATA AND PRESERVING PRIVACY FOR THE BIG DATA IN CLOUD
 
India build problem
India build problemIndia build problem
India build problem
 
美赛论文
美赛论文美赛论文
美赛论文
 
2016 05-20-clariah-wp4
2016 05-20-clariah-wp42016 05-20-clariah-wp4
2016 05-20-clariah-wp4
 
An Overview of Python for Data Analytics
An Overview of Python for Data AnalyticsAn Overview of Python for Data Analytics
An Overview of Python for Data Analytics
 
IOStream.pptx
IOStream.pptxIOStream.pptx
IOStream.pptx
 
ACOMP_2014_submission_70
ACOMP_2014_submission_70ACOMP_2014_submission_70
ACOMP_2014_submission_70
 
employee turnover prediction document.docx
employee turnover prediction document.docxemployee turnover prediction document.docx
employee turnover prediction document.docx
 
Modern association rule mining methods
Modern association rule mining methodsModern association rule mining methods
Modern association rule mining methods
 
Text mining
Text miningText mining
Text mining
 
Data structures and algorithms short note (version 14).pd
Data structures and algorithms short note (version 14).pdData structures and algorithms short note (version 14).pd
Data structures and algorithms short note (version 14).pd
 
F21SC Industrial Programming CW2 Data Analytics (35) 20192.docx
F21SC Industrial Programming CW2 Data Analytics (35) 20192.docxF21SC Industrial Programming CW2 Data Analytics (35) 20192.docx
F21SC Industrial Programming CW2 Data Analytics (35) 20192.docx
 
Week14-Multimedia Information Retrieval.pptx
Week14-Multimedia Information Retrieval.pptxWeek14-Multimedia Information Retrieval.pptx
Week14-Multimedia Information Retrieval.pptx
 
A Document Exploring System on LDA Topic Model for Wikipedia Articles
A Document Exploring System on LDA Topic Model for Wikipedia ArticlesA Document Exploring System on LDA Topic Model for Wikipedia Articles
A Document Exploring System on LDA Topic Model for Wikipedia Articles
 
Group 3
Group 3Group 3
Group 3
 
FDP-faculty deveopmemt program on python
FDP-faculty deveopmemt program on pythonFDP-faculty deveopmemt program on python
FDP-faculty deveopmemt program on python
 
Reengineering PDF-Based Documents Targeting Complex Software Specifications
Reengineering PDF-Based Documents Targeting Complex Software SpecificationsReengineering PDF-Based Documents Targeting Complex Software Specifications
Reengineering PDF-Based Documents Targeting Complex Software Specifications
 
Writing a Databases Research Paper
Writing a Databases Research PaperWriting a Databases Research Paper
Writing a Databases Research Paper
 

More from abibagschennai

You are an astronomer on planet Tirth which orbits a distan.pdf
You are an astronomer on planet Tirth which orbits a distan.pdfYou are an astronomer on planet Tirth which orbits a distan.pdf
You are an astronomer on planet Tirth which orbits a distan.pdf
abibagschennai
 
Use the following table to answer question 12 and 13 12 Inf.pdf
Use the following table to answer question 12 and 13 12 Inf.pdfUse the following table to answer question 12 and 13 12 Inf.pdf
Use the following table to answer question 12 and 13 12 Inf.pdf
abibagschennai
 
Two events A and B that have the property PA and B0 are c.pdf
Two events A and B that have the property PA and B0 are c.pdfTwo events A and B that have the property PA and B0 are c.pdf
Two events A and B that have the property PA and B0 are c.pdf
abibagschennai
 
Toyota Vamos a ir a lugares Toyota Motor Corporation es u.pdf
Toyota Vamos a ir a lugares Toyota Motor Corporation es u.pdfToyota Vamos a ir a lugares Toyota Motor Corporation es u.pdf
Toyota Vamos a ir a lugares Toyota Motor Corporation es u.pdf
abibagschennai
 
Todas las siguientes afirmaciones sobre las HMO son verdader.pdf
Todas las siguientes afirmaciones sobre las HMO son verdader.pdfTodas las siguientes afirmaciones sobre las HMO son verdader.pdf
Todas las siguientes afirmaciones sobre las HMO son verdader.pdf
abibagschennai
 
The most recent financial statements for Assouad Incorporat.pdf
The most recent financial statements for Assouad Incorporat.pdfThe most recent financial statements for Assouad Incorporat.pdf
The most recent financial statements for Assouad Incorporat.pdf
abibagschennai
 
The South African national mountain bike championship is a y.pdf
The South African national mountain bike championship is a y.pdfThe South African national mountain bike championship is a y.pdf
The South African national mountain bike championship is a y.pdf
abibagschennai
 
Steroid hormon reseptrleri transkripsiyon faktrleridir S.pdf
Steroid hormon reseptrleri transkripsiyon faktrleridir S.pdfSteroid hormon reseptrleri transkripsiyon faktrleridir S.pdf
Steroid hormon reseptrleri transkripsiyon faktrleridir S.pdf
abibagschennai
 
Rosewood Hotels amp Resorts Branding para aumentar la ren.pdf
Rosewood Hotels amp Resorts Branding para aumentar la ren.pdfRosewood Hotels amp Resorts Branding para aumentar la ren.pdf
Rosewood Hotels amp Resorts Branding para aumentar la ren.pdf
abibagschennai
 
Let X1Xn be a random sample from the pdf fxex where.pdf
Let X1Xn be a random sample from the pdf fxex where.pdfLet X1Xn be a random sample from the pdf fxex where.pdf
Let X1Xn be a random sample from the pdf fxex where.pdf
abibagschennai
 
Researchers believe that IQ scores may have less to do with .pdf
Researchers believe that IQ scores may have less to do with .pdfResearchers believe that IQ scores may have less to do with .pdf
Researchers believe that IQ scores may have less to do with .pdf
abibagschennai
 
Por qu muestran pinginos y moscas de la fruta Quieren d.pdf
Por qu muestran pinginos y moscas de la fruta  Quieren d.pdfPor qu muestran pinginos y moscas de la fruta  Quieren d.pdf
Por qu muestran pinginos y moscas de la fruta Quieren d.pdf
abibagschennai
 
quickly Fin 1 Fin 4 g33 Nan at the figures Ha2 Provies rip.pdf
quickly  Fin 1 Fin 4 g33 Nan at the figures Ha2 Provies rip.pdfquickly  Fin 1 Fin 4 g33 Nan at the figures Ha2 Provies rip.pdf
quickly Fin 1 Fin 4 g33 Nan at the figures Ha2 Provies rip.pdf
abibagschennai
 
Programming Assignment 4 Chapter 5 Write compile and test.pdf
Programming Assignment 4 Chapter 5 Write compile and test.pdfProgramming Assignment 4 Chapter 5 Write compile and test.pdf
Programming Assignment 4 Chapter 5 Write compile and test.pdf
abibagschennai
 
Oliver is saving for a car At the start of the first month .pdf
Oliver is saving for a car At the start of the first month .pdfOliver is saving for a car At the start of the first month .pdf
Oliver is saving for a car At the start of the first month .pdf
abibagschennai
 
PART 1 What two languages form the basis for medical termi.pdf
PART 1  What two languages form the basis for medical termi.pdfPART 1  What two languages form the basis for medical termi.pdf
PART 1 What two languages form the basis for medical termi.pdf
abibagschennai
 
Over the last decades the rapid spread of digital devices i.pdf
Over the last decades the rapid spread of digital devices i.pdfOver the last decades the rapid spread of digital devices i.pdf
Over the last decades the rapid spread of digital devices i.pdf
abibagschennai
 
Marvin the fly starts at 00 Each step Marvin moves one .pdf
Marvin the fly starts at 00 Each step Marvin moves one .pdfMarvin the fly starts at 00 Each step Marvin moves one .pdf
Marvin the fly starts at 00 Each step Marvin moves one .pdf
abibagschennai
 
If a message of length n bits is sent across a binary symmet.pdf
If a message of length n bits is sent across a binary symmet.pdfIf a message of length n bits is sent across a binary symmet.pdf
If a message of length n bits is sent across a binary symmet.pdf
abibagschennai
 
Look at the following structure declaration struct Containe.pdf
Look at the following structure declaration struct Containe.pdfLook at the following structure declaration struct Containe.pdf
Look at the following structure declaration struct Containe.pdf
abibagschennai
 

More from abibagschennai (20)

You are an astronomer on planet Tirth which orbits a distan.pdf
You are an astronomer on planet Tirth which orbits a distan.pdfYou are an astronomer on planet Tirth which orbits a distan.pdf
You are an astronomer on planet Tirth which orbits a distan.pdf
 
Use the following table to answer question 12 and 13 12 Inf.pdf
Use the following table to answer question 12 and 13 12 Inf.pdfUse the following table to answer question 12 and 13 12 Inf.pdf
Use the following table to answer question 12 and 13 12 Inf.pdf
 
Two events A and B that have the property PA and B0 are c.pdf
Two events A and B that have the property PA and B0 are c.pdfTwo events A and B that have the property PA and B0 are c.pdf
Two events A and B that have the property PA and B0 are c.pdf
 
Toyota Vamos a ir a lugares Toyota Motor Corporation es u.pdf
Toyota Vamos a ir a lugares Toyota Motor Corporation es u.pdfToyota Vamos a ir a lugares Toyota Motor Corporation es u.pdf
Toyota Vamos a ir a lugares Toyota Motor Corporation es u.pdf
 
Todas las siguientes afirmaciones sobre las HMO son verdader.pdf
Todas las siguientes afirmaciones sobre las HMO son verdader.pdfTodas las siguientes afirmaciones sobre las HMO son verdader.pdf
Todas las siguientes afirmaciones sobre las HMO son verdader.pdf
 
The most recent financial statements for Assouad Incorporat.pdf
The most recent financial statements for Assouad Incorporat.pdfThe most recent financial statements for Assouad Incorporat.pdf
The most recent financial statements for Assouad Incorporat.pdf
 
The South African national mountain bike championship is a y.pdf
The South African national mountain bike championship is a y.pdfThe South African national mountain bike championship is a y.pdf
The South African national mountain bike championship is a y.pdf
 
Steroid hormon reseptrleri transkripsiyon faktrleridir S.pdf
Steroid hormon reseptrleri transkripsiyon faktrleridir S.pdfSteroid hormon reseptrleri transkripsiyon faktrleridir S.pdf
Steroid hormon reseptrleri transkripsiyon faktrleridir S.pdf
 
Rosewood Hotels amp Resorts Branding para aumentar la ren.pdf
Rosewood Hotels amp Resorts Branding para aumentar la ren.pdfRosewood Hotels amp Resorts Branding para aumentar la ren.pdf
Rosewood Hotels amp Resorts Branding para aumentar la ren.pdf
 
Let X1Xn be a random sample from the pdf fxex where.pdf
Let X1Xn be a random sample from the pdf fxex where.pdfLet X1Xn be a random sample from the pdf fxex where.pdf
Let X1Xn be a random sample from the pdf fxex where.pdf
 
Researchers believe that IQ scores may have less to do with .pdf
Researchers believe that IQ scores may have less to do with .pdfResearchers believe that IQ scores may have less to do with .pdf
Researchers believe that IQ scores may have less to do with .pdf
 
Por qu muestran pinginos y moscas de la fruta Quieren d.pdf
Por qu muestran pinginos y moscas de la fruta  Quieren d.pdfPor qu muestran pinginos y moscas de la fruta  Quieren d.pdf
Por qu muestran pinginos y moscas de la fruta Quieren d.pdf
 
quickly Fin 1 Fin 4 g33 Nan at the figures Ha2 Provies rip.pdf
quickly  Fin 1 Fin 4 g33 Nan at the figures Ha2 Provies rip.pdfquickly  Fin 1 Fin 4 g33 Nan at the figures Ha2 Provies rip.pdf
quickly Fin 1 Fin 4 g33 Nan at the figures Ha2 Provies rip.pdf
 
Programming Assignment 4 Chapter 5 Write compile and test.pdf
Programming Assignment 4 Chapter 5 Write compile and test.pdfProgramming Assignment 4 Chapter 5 Write compile and test.pdf
Programming Assignment 4 Chapter 5 Write compile and test.pdf
 
Oliver is saving for a car At the start of the first month .pdf
Oliver is saving for a car At the start of the first month .pdfOliver is saving for a car At the start of the first month .pdf
Oliver is saving for a car At the start of the first month .pdf
 
PART 1 What two languages form the basis for medical termi.pdf
PART 1  What two languages form the basis for medical termi.pdfPART 1  What two languages form the basis for medical termi.pdf
PART 1 What two languages form the basis for medical termi.pdf
 
Over the last decades the rapid spread of digital devices i.pdf
Over the last decades the rapid spread of digital devices i.pdfOver the last decades the rapid spread of digital devices i.pdf
Over the last decades the rapid spread of digital devices i.pdf
 
Marvin the fly starts at 00 Each step Marvin moves one .pdf
Marvin the fly starts at 00 Each step Marvin moves one .pdfMarvin the fly starts at 00 Each step Marvin moves one .pdf
Marvin the fly starts at 00 Each step Marvin moves one .pdf
 
If a message of length n bits is sent across a binary symmet.pdf
If a message of length n bits is sent across a binary symmet.pdfIf a message of length n bits is sent across a binary symmet.pdf
If a message of length n bits is sent across a binary symmet.pdf
 
Look at the following structure declaration struct Containe.pdf
Look at the following structure declaration struct Containe.pdfLook at the following structure declaration struct Containe.pdf
Look at the following structure declaration struct Containe.pdf
 

Recently uploaded

Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
ArianaBusciglio
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Delivering Micro-Credentials in Technical and Vocational Education and Training
Delivering Micro-Credentials in Technical and Vocational Education and TrainingDelivering Micro-Credentials in Technical and Vocational Education and Training
Delivering Micro-Credentials in Technical and Vocational Education and Training
AG2 Design
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Ashish Kohli
 
Landownership in the Philippines under the Americans-2-pptx.pptx
Landownership in the Philippines under the Americans-2-pptx.pptxLandownership in the Philippines under the Americans-2-pptx.pptx
Landownership in the Philippines under the Americans-2-pptx.pptx
JezreelCabil2
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
chanes7
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
NelTorrente
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
RitikBhardwaj56
 

Recently uploaded (20)

Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Delivering Micro-Credentials in Technical and Vocational Education and Training
Delivering Micro-Credentials in Technical and Vocational Education and TrainingDelivering Micro-Credentials in Technical and Vocational Education and Training
Delivering Micro-Credentials in Technical and Vocational Education and Training
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
 
Landownership in the Philippines under the Americans-2-pptx.pptx
Landownership in the Philippines under the Americans-2-pptx.pptxLandownership in the Philippines under the Americans-2-pptx.pptx
Landownership in the Philippines under the Americans-2-pptx.pptx
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
 

publicationDatatxt.pdf

  • 1. **********************************publicationData.txt********************************************** **********************************queries.txt************************************************ Purpose The main purpose of this homework is to practice an important data structure, i.e., Map. In addition, it continues practicing Object-oriented programming (inheritance, abstract classes and interfaces), input/output, string manipulations, and lists. Instructions Design and implement the following interface and classes: - Document (interface): Any document must have get methods to access its title, authors (including first and last names), and year of production. - Publication (abstract class): A publication is a document that was published. In addition to title, authors and year, a publication also has a publisher. Implement constructor(s), toString and get methods. You must put a contract in this class that all subclasses of Publication must implement a getPageNumbers method (returns the total number of pages of a publication). - Book (class): A book is a publication that has an ISBN number, a price, and total number of pages. Implement the constructor(s), toString, and any other mandatory methods. - JournalPaper (class): A journal paper is a publication that has a journal name, starting and ending page numbers. Implement the constructor(s), toString and any other mandatory methods. - Main (class): Your main program tests everything. You must utilize an important data structure, i.e., a map, which simulates a database to facilitate the lookup process (i.e., given an author, find his/her publications). The keys of the map are the author names, and the values of the map are lists of publications. In addition to main method, implement the following helper methods: - add(List authors, Publication p): add the publication to the database for each author. - initDatabase(File f): read from the publication data file and initialize the database. - processQueries(File f): read from the query file to perform the queries/searchs in the databe. Data Format There are two files, i.e., publicationData.txt and queries. txt1. In both files, each line contains comma separated items.publicationData.txt contains one publication record per line, and has the following format depending the first column type is a book or a journal paper: Note that there can be one or more authors. Do not make any assumption on the maximum number of authors. For example, the followings are two sample publication records: book, Introduction to Java Programming and Data Structures,2020,Pearson,9780136520238,123.45,1218, Y. Daniel Liang journal, Visual analysis of large-scale network anomalies, 2013, IBM, IBM Journal of Research and Development,1,12, Qi Liao, Lei Shi, Chen Wang queries.txt contains one query per line, and has the following format: For example, the followings are two sample queries: Y. Daniel Liang, book Qi Liao, journal If an author and a publication type is found, display all relevant publication information and a total count of publications. If not found, display not found in database accordingly (see Sample Output). Sample Output Searching "John Smith" for "book" .... Author: John Smith is not in the database. Searching "Paul Tyma" for "journal" .... Journal: Title: Survey of O0 Architechures, Authors: [Paul Tyma], Year: 2003, Publisher: IEEE, Journal of Software Engineering, Pages: 14 Journal: Title: Stream Functions, Authors: [Paul Tyma, Roger Stephens], Year: 2003, Publisher: IEEE Computer Society, Journal of Formal Methods, Pages: 71 Journal: Title: Irregular Interactive Stacks, Authors: [Walter Dosch, Joseph Broy, Paul Tyma], Year: 2007, Publisher: Spinger, Journal of Scientific Computing, Pages: 234 Author: Paul Tyma has 3 journal publications. Searching "Paul Tyma" for "book" .... Author: Paul Tyma has no publication in book. Searching "Qi Liao" for "journal" .... Journal: Title: Preventive portfolio against data-selling ransomware - a game theory of encryption
  • 2. and deception, Authors: [Zhen Li, Qi Liao], Year: 2022, Publisher: Elsevier, Computers & Security, Pages: 10 Journal: Title: Network pricing: can both ISP and P2P benefit?, Authors: [Zhen Li, Qi Liao], Year: 2014, Publisher: John Wiley & Sons, Ltd., Pages: 16 Journal: Title: Analyzing spatiotemporal anomalies through interactive visualization, Authors: [Tao Zhang, Qi Liao, Lei Shi, Weishan Dong], Year: 2014, Publisher: MDPI, Informatics, Pages: 25 Journal: Title: Visual analysis of large-scale network anomalies, Authors: [Qi Liao, Lei Shi, Chen Wang], Year: 2013, Publisher: IBM, IBM Journal of Research and Development, Pages: 11 Journal: Title: Oniongraph: Hierarchical topology+attribute multivariate network visualization, Authors: [Lei Shi, Qi Liao, Hanghang Tong, Yifan Hu, Chaoli Wange, Chuang Lin, Weihong Qian], Year: 2020, Publisher: Elsevier, Visual Informatics, Pages: 14 Author: Qi Liao has 5 journal publications. Searching "Qi Liao" for "book".... Book: Title: How to be an awesome professor, Authors: [Qi Liao], Year: 2023, Publisher: CMU, ISBN: 12345678910, Price: 99.99, Pages: 50 Author: Qi Liao has 1 book publications.Note you must properly handle all possible exceptions to prevent program crashes. Please do not hard code absolute file paths that are unique to your computer. Use relative paths and assume the files are located in the same directory of your program. You do not need to submit the two data files that you downloaded from Blackboard.