Modifier and Type | Field and Description |
---|---|
private NewsMaker |
NewsStory.newsMaker1
The first news maker featured in the story.
|
private NewsMaker |
NewsStory.newsMaker2
The second news maker featured in the story.
|
Modifier and Type | Field and Description |
---|---|
private java.util.List<NewsMaker> |
NewsMakerList.newsMakers
The list of news makers.
|
Modifier and Type | Method and Description |
---|---|
NewsMaker |
NewsMakerList.get(NewsMaker newsMaker)
An accessor method to get a news maker from the list.
|
NewsMaker |
NewsMakerList.getExactMatch(java.lang.String newsMakerName)
This method should be able to use a binary search to find the news maker
but relies on the list being sorted first.
|
NewsMaker |
NewsStory.getNewsMaker1()
The accessor for the first news maker field.
|
NewsMaker |
NewsStory.getNewsMaker2()
The accessor for the second news maker field.
|
NewsMaker |
NewsMakerList.getPartialMatch(java.lang.String newsMakerName)
This method searches for partial matches in the list, and returns the
first news maker that contains the search string specified.
|
Modifier and Type | Method and Description |
---|---|
void |
NewsMakerList.add(NewsMaker newsMaker)
The mutator for adding news makers to the list.
|
int |
NewsMaker.compareTo(NewsMaker newsMaker)
The required
compareTo method for implementing
Comparable . |
boolean |
NewsMakerList.contains(NewsMaker newsMaker)
An accessor method to test whether the list already contains a news
maker.
|
static java.lang.String |
UserInterface.createListOfNewsStoriesForNewsmaker(NewsMaker newsMaker,
java.lang.String mediaType,
java.lang.String[] sortCriteria)
This method takes a news maker and turns its list of news stories into a
String formated for display to the user or saving to a text
file. |
static void |
UserInterface.displayPieChartForNewsMaker(NewsMaker newsMaker,
java.lang.String mediaType,
java.lang.String content,
java.lang.String measure)
This method displays a pie chart for a given news maker.
|
NewsMaker |
NewsMakerList.get(NewsMaker newsMaker)
An accessor method to get a news maker from the list.
|
static void |
UserInterface.reportNewsmakerNotFound(NewsMaker queriedNewsMaker)
This method reports at the console that there were no relevant stories
found.
|
Constructor and Description |
---|
NewspaperStory(java.time.LocalDate date,
java.lang.String sourceName,
int length,
java.lang.String topic,
java.lang.String subject,
NewsMaker newsMaker1,
NewsMaker newsMaker2)
The constructor which takes parameters for all of the fields can simply
pass them to the constructor for
NewsStory and let it do the
work. |
NewsStory(java.time.LocalDate date,
java.lang.String source,
int length,
java.lang.String topic,
java.lang.String subject,
NewsMaker newsMaker1,
NewsMaker newsMaker2)
The constructor for the class which takes objects of appropriate types to
initialize all of the fields.
|
OnlineNewsStory(java.time.LocalDate date,
java.lang.String sourceName,
int length,
java.lang.String topic,
java.lang.String subject,
PartOfDay partOfDay,
NewsMaker newsMaker1,
NewsMaker newsMaker2)
The constructor which takes parameters for all of the fields can simply
pass most of them to the constructor for
NewsStory and let
it do most of the work. |
TVNewsStory(java.time.LocalDate date,
java.lang.String sourceName,
int length,
java.lang.String topic,
java.lang.String subject,
PartOfDay partOfDay,
NewsMaker newsMaker1,
NewsMaker newsMaker2)
The constructor which takes parameters for all of the fields can simply
pass most of them to the constructor for
NewsStory and let
it do most of the work. |