Question: package project; import java.io . FileNotFoundException; import java.io . IOException; import java.util.ArrayList; import javax.swing.JPanel; import project.enums.PostAudience; import project.enums.PostDataType; public class RegularPost extends Post { private
package project;
import java.ioFileNotFoundException;
import java.ioIOException;
import java.util.ArrayList;
import javax.swing.JPanel;
import project.enums.PostAudience;
import project.enums.PostDataType;
public class RegularPost extends Post
private ArrayList contents; at most one image can be in a post
public RegularPostPostAudience whoCanSee
superwhoCanSee;
contents new ArrayList;
public void addTextString text
contents.addnew Contenttext;
public void addImageString fileName throws FileNotFoundException
contents.addnew ContentfileName PostDataType.Image;
@Override
public String toString
regenerate this so that it is nicely formatted, especially the contents
return "Post postID postID whoCanSee whoCanSee.getDescription contents contents
popularityScore popularityScore upVoters upVoters.size downVoters
downVoters.size;
@Override
public JPanel display
return null;
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
