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
Luminous Jewels - The Polishing Game Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various lum

What does the keyword " synchronize " mean in java. What are the usage and disadvantages of synchronization?

Include Photo Upload feature to Android App with Google App Engine Project Description: I have one small Android App skeleton that requires some features added to and backed

The IncludeAction class is useful when you require to integrate Struts into an application that uses Servlets. Use the IncludeAction class to contain another resource in the respon

Describe java operators? An operator is a symbol which operates on one or more arguments to generate a result. The Hello World program is so easy it doesn't use any operators,

I have three data structures projects that I need help with.

How to Implementing the Cloneable Interface The java.lang.Object class contains a clone() method which returns a bitwise copy of the current object. protected native Object cl

Question 1: a) What is the meaning of an object-oriented programming? b) List eight simple types of data in Java c) Explain how objects and classes are closely related.

Taking in Command Line Arguments In Java, the program can be written to accept command-line-arguments. Example Code:  command-line arguments /*  This

A portal is a service or a Web site that gives broad range of services and resources like e-mail, forums, search engines, weather information, news, on-line shopping, stock quotes.