Hello. I am new to this. Thank you for a website like this where people can help! This is a Qt assignment. I already started with the question but I always get to a point then I don’t know anymore.
Given below is a UML class diagram that models three types of references; generic references, journal
articles and conference papers.
A reference can be authored by many authors. In Reference, the authors are represented by the data
member authors of type QStringList where each author is stored as a QString. Besides a list of
authors, the Reference class has data members to store the title of the reference, year of publication, a
reference ID and a reference type. The reference types for a generic reference, a journal article and a
conference paper are “Generic”, “Journal” and “Conference” respectively.
The subclasses of Reference have additional data members and functions. A journal article also stores
the name of the journal, volume and number. A conference paper also stores the conference name and
the month in which the conference was held. Most of the functions in the Reference class hierarchy are
self-explanatory.
There are numerous referencing styles used by scientific communities for generating entries in a
bibliography. One such style is APA. The function toAPAStyle() in the Reference class hierarchy is
meant to return a bibliographic entry in a style more or less similar to APA. Given below are three
examples of bibliographic entries to be returned by toAPAStyle() in the Reference,
JournalArticle and ConferencePaper classes.
*Pilkington, CL, Thomas, A (2016), Gamification of a module in advanced
programming
*Thomas, A, Halland, KJ (2017), Foundational concepts for teaching software
design patterns, JOOP, Vol 1 No 1
*Halland, KJ, Thomas, A, Pilkington, CL (2015), Teaching OOP using the Qt
framework, SACLA, July 2015
In general, a toString() function returns the string equivalent of the state of an object. The state of an
object refers to the values of its data members at a given time. In the Reference class hierarchy,
implement toString() so that the values of the data members are appropriately labeled. An example
of a labeled generic reference is given below:
Authors: Pilkington, CL, Thomas, A
Year: 2016
Title: Gamification of a module in advanced programming
Type: Generic
Ref ID: PilTho16
Given below are the details of a container class named ReferenceList that manages a list of
References. The Reference class in the diagram is the same as the Reference class in the UML
class diagram above.
The functions of the ReferenceList class should do the following:
? The destructor should delete all the Reference objects.
? addReference() adds an object pointed to by a Reference pointer, provided a reference with the
same reference ID does not exist in the list. The function returns true or false to indicate whether
the reference was successfully added.
? generateReferences() returns the string equivalent of all references for the reference IDs passed
to the function. The bool parameter full indicates how the requested references should be
included. When full is true, it should return the complete labeled string representation of
references and when it is false, it should return the APA style string representation of references.
? getIDsByAuthor() returns all the reference IDs of the references authored by a given author.
? getIDsByConference() returns all the reference IDs of the references presented at a conference.
? getIDsByJournalName() returns all the reference IDs of the references published in a specific
journal.
? findByID() checks whether a reference with the given ID exists in the list of references. If it exists,
the function returns a pointer to that Reference object. If it does not exist, the function returns a null
pointer. Take note to invoke this function in other functions of ReferenceList when appropriate.
Test all these classes by creating at least two objects of every concrete class in the Reference
hierarchy and by adding them to a ReferenceList object. Also try adding a Reference object that is
already in the list to demonstrate that each reference in the list has a unique reference ID. Then test
getIDsByAuthor(), getIDsByConference(), getIDsbyJournalName() with appropriate
arguments. The reference IDs returned by these three functions should be used to test
generateReferences(). The QString returned by generateReferences() should be displayed
on the console. You should also demonstrate the difference in the string representation of references by
generateReferences() when the bool parameter full is true or false.
You need to develop a console application and not a GUI app.
Given below is a UML class diagram that models three types of references; generic references, journal
articles and conference papers.
A reference can be authored by many authors. In Reference, the authors are represented by the data
member authors of type QStringList where each author is stored as a QString. Besides a list of authors,
the Reference class has data members to store the title of the reference, year of publication, a reference
ID and a reference type. The reference types for a generic reference, a journal article and a conference
paper are "Generic", "Journal" and "Conference" respectively.
The subclasses of Reference have additional data members and functions. A journal article also stores the
name of the journal, volume and number. A conference paper also stores the conference name and the
month in which the conference was held. Most of the functions in the Reference class hierarchy are selfexplanatory. There are numerous referencing styles used by scientific communities for generating entries
in a bibliography. One such style is APA. The function toAPAStyle() in the Reference class hierarchy is
meant to return a bibliographic entry in a style more or less similar to APA. Given below are three
examples of bibliographic entries to be returned by toAPAStyle() in the Reference, JournalArticle and
ConferencePaper classes.
Pilkington, CL, Thomas, A (2016), Gamification of a module in advanced programming
Thomas, A, Halland, KJ (2017), Foundational concepts for teaching software design patterns, JOOP, Vol 1
No 1
Halland, KJ, Thomas, A, Pilkington, CL (2015), Teaching OOP using the Qt framework, SACLA, July 2015
In general, a toString() function returns the string equivalent of the state of an object. The state of an
object refers to the values of its data members at a given time. In the Reference class hierarchy,
implement toString() so that the values of the data members are appropriately labeled. An example of a
labeled generic reference is given below:
Authors: Pilkington, CL, Thomas, A
Year: 2016
Title: Gamification of a module in advanced programming
Type: Generic
Ref ID: PilTho16
Given below are the details of a container class named ReferenceList that manages a list of
References. The Reference class in the diagram is the same as the Reference class in the UML
class diagram above.
The functions of the ReferenceList class should do the following:
? The destructor should delete all the Reference objects.
? addReference() adds an object pointed to by a Reference pointer, provided a reference with the same
reference ID does not exist in the list. The function returns true or false to indicate whether the reference
was successfully added.
? generateReferences() returns the string equivalent of all references for the reference IDs passed to the
function. The bool parameter full indicates how the requested references should be included. When full is
true, it should return the complete labeled string representation of references and when it is false, it
should return the APA style string representation of references.
? getIDsByAuthor() returns all the reference IDs of the references authored by a given author.
? getIDsByConference() returns all the reference IDs of the references presented at a conference.
? getIDsByJournalName() returns all the reference IDs of the references published in a specific journal.
? findByID() checks whether a reference with the given ID exists in the list of references. If it exists, the
function returns a pointer to that Reference object. If it does not exist, the function returns a null pointer.
Take note to invoke this function in other functions of ReferenceList when appropriate.
Test all these classes by creating at least two objects of every concrete class in the Reference hierarchy
and by adding them to a ReferenceList object. Also try adding a Reference object that is already in the list
to demonstrate that each reference in the list has a unique reference ID. Then test getIDsByAuthor(),
getIDsByConference(), getIDsbyJournalName() with appropriate arguments. The reference IDs returned by
these three functions should be used to test generateReferences(). The QString returned by
generateReferences() should be displayed on the console. You should also demonstrate the difference in
the string representation of references by generateReferences() when the bool parameter full is true or
false.
You need to develop a console application and not a GUI app.