Lab
3
Get started now
@BOOK { CS1021Text,
author = "John Dean and Raymond Dean",
title = "Introduction to Programming with Java",
publisher = "McGraw Hill",
year = "2014"
}
An article, published in a magazine, might be referenced in the format
shown below.
@ARTICLE { WSMA2006,
author = "Walter Schilling and Dr. Mansoor Alam",
title = "Integrate static analysis into a software development process",
journal = "Embedded Systems Design",
pages = "67-72",
year = "2006"
}
Note that the unique identifiers in these two examples (`CS1021Text`
and `WSMA2006`) were hand chosen. For your code, you will create
them in an automated way where the first is `REF0`, then
`REF1`, then `REF2`, and so on (see sample output below).
In this lab, you are going to create a system which will allow the user
to enter the fields for a given set of references and then be able to print
out the bibtex entries for the entered references.
You must implement all of the classes in the UML class diagram below.
[Javadoc](lab3doc/index.html) is available for all of the classes in the
diagram. Be sure to read the complete Javadoc cafefully
to ensure that your implementation of each method meets the specifications
provided in the Javadoc. Note that when you update a reference, you can
assume that the user will need to update the entire entry, not just the
one component of the entry.
In addition, you must create a separate class with your main program that
will allow the user to enter, update, and remove references from a collection
of references. See the sample program execution below for an example of how
your program should operate.
Enter 0 to exit the program.
Enter 1 to enter a new book into the reference set.
Enter 2 to enter a new article into the reference set.
Enter 3 to update a reference.
Enter 4 to printout the entries in Bibtex format.
Enter 5 to remove a reference.
1
Enter the author of the reference
John Will
Enter the title of the reference
Star Wars
Enter the copyright year of the reference
1980
Enter the publisher of the book
20th Century Fox
Enter 0 to exit the program.
Enter 1 to enter a new book into the reference set.
Enter 2 to enter a new article into the reference set.
Enter 3 to update a reference.
Enter 4 to printout the entries in Bibtex format.
Enter 5 to remove a reference.
2
Enter the author of the reference
Carl Sagan
Enter the title of the reference
A Celebration of Isaac Asimov: A Man for the Universe
Enter the copyright year of the reference
1992
Enter the title of the journal
The Skeptical Inquirer
Enter the first page number of the article
5
Enter the last page number of the article
7
Enter 0 to exit the program.
Enter 1 to enter a new book into the reference set.
Enter 2 to enter a new article into the reference set.
Enter 3 to update a reference.
Enter 4 to printout the entries in Bibtex format.
Enter 5 to remove a reference.
4
@BOOK { REF0,
author = "John Will",
title = "Star Wars",
publisher = "20th Century Fox",
year = "1980"
}
@ARTICLE { REF1,
author = "Carl Sagan",
title = "A Celebration of Isaac Asimov: A Man for the Universe",
journal = "The Skeptical Inquirer",
pages = "5-7",
year = "1992"
}
Enter 0 to exit the program.
Enter 1 to enter a new book into the reference set.
Enter 2 to enter a new article into the reference set.
Enter 3 to update a reference.
Enter 4 to printout the entries in Bibtex format.
Enter 5 to remove a reference.
3
Enter the ID of the reference you want to update
REF0
Enter the updated author of the reference
John Williams
Enter the updated title of the reference
Star Wars: The Musical Score
Enter the updated copyright year for the reference.
1977
Enter the updated publisher for the book
20th Century Fox
Enter 0 to exit the program.
Enter 1 to enter a new book into the reference set.
Enter 2 to enter a new article into the reference set.
Enter 3 to update a reference.
Enter 4 to printout the entries in Bibtex format.
Enter 5 to remove a reference.
4
@BOOK { REF0,
author = "John Williams",
title = "Star Wars: The Musical Score",
publisher = "20th Century Fox",
year = "1977"
}
@ARTICLE { REF1,
author = "Carl Sagan",
title = "A Celebration of Isaac Asimov: A Man for the Universe",
journal = "The Skeptical Inquirer",
pages = "5-7",
year = "1992"
}
Enter 0 to exit the program.
Enter 1 to enter a new book into the reference set.
Enter 2 to enter a new article into the reference set.
Enter 3 to update a reference.
Enter 4 to printout the entries in Bibtex format.
Enter 5 to remove a reference.
0
Goodbye
## Lab Deliverables
> See your professor's instructions for details on submission guidelines
> and due dates.
> * Dr. Taylor's students: See below
> * All other students should refer to Blackboard
>
> If you have any questions, consult your instructor.
## Acknowledgment
This laboratory assignment was developed by [Dr. Walter Schilling](http://walterschilling.us/) and the CS1021 instructors.