Modify user profile class, JAVA Programming

Modify your UserProfile class to meet the following requirements:

  1. It must include a field called wall to store an ArrayList of wall posting objects. It must also provide a getter called getWall() that returns the ArrayList of wall posting objects. The list should initially be empty for a newly created UserProfile.
  2. It must provide a method called postToWall() that takes two parameters: the author of the posting (a user profile, not a string) and a string message. This method should add a new wall posting with the given contents.

Note that wall postings should be stored in reverse-chronological order, meaning that newly created posts should be stored at the beginning of the list, not at the end. Also, this method should ensure that the total number of posts does not exceed 20. Once the wall gets that full, delete the oldest post to make room for a new one. Study the API documentation for ArrayList to find suitable methods to accomplish this arrangement. You may assume that the clock is consistent, that is, postings created more recently will also have a more recent time stamp.

Posted Date: 3/13/2013 4:02:11 AM | Location : United States







Related Discussions:- Modify user profile class, Assignment Help, Ask Question on Modify user profile class, Get Answer, Expert's Help, Modify user profile class Discussions

Write discussion on Modify user profile class
Your posts are moderated
Related Questions
List down the Analytical Engine's elements name An analytical engine elements are as follows: Input Memory Processor Output.

How to Drawing Images at Actual Size Once the image is loaded draw it in the paint() method by using the drawImage() method like this g.drawImage(img, x, y, io) img is a

Explain Labeled Loops in details ? Generally inside nested loops break and continue exit the innermost enclosing loop. For instance consider the subsequent loops. for (int i=1

Example:  You have a class named "Set" in a project folder "e:\myProject" and package named com.zxy.client, will you be able to compile and execute it as it is

What is the preferred organizational structure for the organization? Preferred Organizational Structure for organization is hierarchal. Where there is various departments inter

This assignment requires you to design, implement and test a program using Java features from the first half of the subject content. You are required to implement in Java all the c

Don''t know how to write this...can anyone help me?

creating a point of sale

Write a CGI program in R, accessible through the class web server, that performs an analysis or creates a graph. You can provide a separate HTML page that displays the initial form

Describe the Edit phase- Java Program Development Phase comprises editing a file. This is done with an editor program. Programmer types a java program using editor such as no