Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

public class Article { private int numWords; private int year; private String author; / * Your code goes here * / public void setNumWords (

public class Article {
private int numWords;
private int year;
private String author;
/* Your code goes here */
public void setNumWords(int articleNumWords){
numWords = articleNumWords;
}
public void setYear(int articleYear){
year = articleYear;
}
public void setAuthor(String articleAuthor){
author = articleAuthor;
}
public void print(){
System.out.println("Number of words: "+ numWords +", Year: "+ year +", Author: "+ author);
}
}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Who poses the biggest security threat insiders or outsiders?

Answered: 1 week ago