Question: uild Some Journalists Create an abstract class named Journalist. Include a String field for the journalists name and a double field for the her/his annual
uild Some Journalists Create an abstract class named Journalist. Include a String field for the journalists name and a double field for the her/his annual salary. Within the class, include a constructor that requires the journalist's name, and add two get methods one that returns his/her name and one that returns her/his salary. Include an abstract method named setSalary(). Create two child classes of Journalist: OpinionWriter and Investigator. Each must include a setSalary() method that sets the salary for all OpinionWriter Journalists to $60,000 and for all Investigator Journalists to $70,000. Write a constructor for each subclass, and include a call to setSalary() within each. Write an application, named MakeJournalists.java, demonstrating that you can create both an OpinionWriter named Jonathan Capehart and an Investigator Journalist named Yamiche Alcindor, and display their fields. Write your Java code using jGrasp or whatever IDE you prefer. When you are done you should have four *.java files: Journalist.java, OpinionWriter.java, Investigator.java and MakeJournalists.java. Make sure all 4 files compile without error and that MakeJournalists.java runs correctly.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
