تم الحل ✓
categoryبرمجة وتطوير البرمجيات
schoolبكالوريوس
event_available2026-07-15
السؤال
Transcribed Image Text:
In this assignment we get practice using ArrayLists and HashMaps and how to query them. There are two classes.
The ResearchPaper class is the record, and PaperDBModel is the database. You are to finish PaperDBModel by
properly storing and retrieving the records in ArrayLists and HashMaps.
You are given some test records in a file paper.txt. Most IDE's are particular about where they read files from. If
you are using IntelliJ, you must copy and paste paper.txt into the project folder (that is, the highest level folder that
contains your src, out, and .idea folders).
You are encouraged to add records to paper.txt for testing purposes (see question 5).
1) [4 marks] Open PaperDBModel.java. All the data structures you need are listed as member variables. Instantiate
each of them in the constructor.
2) [8 marks] Complete getResearchPaper, getPapersByAuthor, getPapersByConference, and getPapersByKeyword.
Descriptions are in the comments. Note the return type.
3) [20 marks] Complete AddResearchPaper and Remove ResearchPaper (most of the work is here). Each paper
should be added or removed from all data structures.
4)[12 marks] Complete a) getPapersByAuthor And Conference and b) getPapersByAuthors. These methods should
return all papers that a) were published in the given conference and have the given author listed, and b) have all the
given authors listed.
5) [8 marks] - This question is no longer necessary. These tests have been given to you in
PaperDBModelTester.java, and everyone who submits the assignment will automatically get 8 marks for this
question. The static main method loads some records from a file (paper.txt) and prints them to the console. Write
tests for the methods above. Simply printing them out is enough, but there must be records that both meet the
description of the method and those that do not so that we can determine the method works properly. For example,
in getPapersByAuthor you must have at least one record with the author given as argument, as well as at least
one record without. You can add records to paper.txt by following the instructions in paper.txt
check_circle الجواب — حل مفصل خطوة بخطوة
hourglass_top
🔒
الحل الكامل متاح للمشتركين
اشترك في أرشيف الأسئلة لعرض هذا الحل وآلاف الحلول المفصلة خطوة بخطوة من معلمين معتمدين.