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
Java expert with tomcat tuning experience needed Project Description: Want a Java expert to fix memory issues with tomcat. I need School java project - Threads Programm

What is JDBC exactly? Describe the steps required to execute a SQL query using JDBC.

We need an OpenGL - based visualisation of an OBJ-File that was created out of Maya3D. (important: we have to use OpenGL with Java - JOGL) In other words: we have an OBJ-file (a

What is static in java? Static means one per class, not one for each object no matter how many example of a class might exist. This means that you can use them without making a

Java Message Service: An interface executed by most J2EE containers to give point-to-point queueing and topic (publish/subscribe) behavior. JMS is frequently used by EJB's that req

Write a program that reads both the girl and boy files into memory using arrays. Then, allow the user to input a name. The program should search through both arrays. If there is

Does the java applet using swing components, JAVA Programming on this contain all the source codes for download?

I have a project due tonight and I need help setting up the project I know what I need to put in the class but not sure how to set it up properly

What is the Set interface? A Set interface is collection of element that can't be duplicated. Set interface comprise methods inherited from collection. It provides method