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
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

Project Description: I need Team speak 3 client for Nokia Symbian platform. Project for Nokia E72, but should work on all Java/Symbian mobiles. Feature list should include

What is bandwidth? In a general way Bandwidth is a capacity of communication channel of carrying data.

Explain the term Naming Packages in details? As you saw previously name space conflicts arise if two pieces of code declare the similar name. Java remains track of what belongs

Illustrate the method to print on the GUI Example Code: Taking Input / Output So far, we learned how to print something on console. Now time has come to learn how to print

The Post Office Protocol is an application-level protocol within an intranet which is used by the local e-mail clients to send and retrieve e-mails from a remote server those are l

• A Graph Data Type (including a display method to show adjacencies) • A Cycle Checker (as described in lecture notes) • An Edge class • A sorting algorithm to sort an array of Edg

object

Specifications 1. readNumberOfEntries → This function will ask the user for a value greater than or equal to two. The function will keep asking values as long as the user prov

Question 1 Explain any five buzz words in Java Question 2 Explain exception classes and also explain common exceptions in java Question 3 Explain primitive and abstract data t