Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The Rockford Daily Clarion wants you to design a class named Issue. Fields inclu

ID: 3544014 • Letter: T

Question

The Rockford Daily Clarion wants you to design a class named Issue.  Fields include the issue number, total number of advertisements sold in the issue, and total advertising revenue.  Include get and set methods for each field.  Include a static method that displays the newspaper

The Rockford Daily Clarion wants you to design a class named Issue. Fields include the issue number, total number of advertisements sold in the issue, and total advertising revenue. Include get and set methods for each field. Include a static method that displays the newspaper's motto ("Everything you need to know"). Include three overloaded constructors as follows: - a default constructor that sets the issue number to 1 and the other fields to 0 - a constructor that allows you to pass values for all three fields - a constructor that allows you to pass an issue number and a number of advertisements sold, but sets the advertising revenue to $50 per ad. Create the class diagram and write the pseudocode that defines the class. Design an application that declares three Issue objects using a different constructor version with each object. Display each Issue's values and then display the motto. Specifically need help with the last part, please. In pseucode. Thanks!!!

Explanation / Answer


public class Issue {


//Fields or instance variables

public int issueNumber;

public int totalNumber;

public int totalAdvNumber;

public int totalAdvRevenue;

//default constructor

public Issue(){

issueNumber =1;

totalNumber =0;

totalAdvNumber =0;

totalAdvRevenue =0;

}

public Issue(int issueNumber, int totalNumber, int totalAdvNumber, int totalAdvRevenue){

this.issueNumber = issueNumber;

this.totalNumber = totalNumber;

this.totalAdvNumber = totalAdvNumber;

this.totalAdvRevenue = totalAdvNumber;

}

public Issue(int issueNumber, int numberAdvSold){

this.issueNumber = issueNumber;

totalAdvRevenue = numberAdvSold * 50;

}


public void setIssueNumber(int issueNumber) {

this.issueNumber = issueNumber;

}


public void setTotalNumber(int totalNumber) {

this.totalNumber = totalNumber;

}


public void setTotalAdvNumber(int totalAdvNumber) {

this.totalAdvNumber = totalAdvNumber;

}


public void setTotalAdvRevenue(int totalAdvRevenue) {

this.totalAdvRevenue = totalAdvRevenue;

}


public int getIssueNumber() {

return issueNumber;

}


public int getTotalNumber() {

return totalNumber;

}


public int getTotalAdvNumber() {

return totalAdvNumber;

}


public int getTotalAdvRevenue() {

return totalAdvRevenue;

}

//static method

public static void motto(){

System.out.println("Everything you need to know");

}

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote