Modify user profile class, JAVA Programming

Assignment Help:

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.


Related Discussions:- Modify user profile class

What are the implicit objects in jsp, Implicit objects are formed by the we...

Implicit objects are formed by the web container and have information related to a particular request, page, or application. They are request, response, pageContext, session, appli

Need mahjong puzzle game, Need Mahjong puzzle game I want someone to mak...

Need Mahjong puzzle game I want someone to make this game ( Mahjong puzzle game) for me in Android ONLY. If you have high level programming knowledge in Android then please b

Write a quality and complexity analysis report, Write a quality and complex...

Write a quality and complexity analysis report, JAVA Programming

Prepare a java program to read .gpx files, Prepare a Java program to read ....

Prepare a Java program to read .GPX files Project Description: Prepare a Java program (GPX_Tracks_to_Text.Java) for Windows to: - Read every .GPX file in a provide drive a

What is final class, What is final class? A final class can't be extend...

What is final class? A final class can't be extended ie., final class might not be subclassed. A final method can't be overridden when its class is inherited. You can't alter v

What is a packet in the network environment, What is a packet within the ne...

What is a packet within the network environment? What kind of information does it contain? A packet is the shortest unit of data transmitted over a computer network. It's a mes

Applet program, file download from server using applet and tomcat server

file download from server using applet and tomcat server

Lookupdispatchaction and dispatchaction, What is difference among LookupDis...

What is difference among LookupDispatchAction and DispatchAction? Ans) The difference among LookupDispatchAction and DispatchAction is that the actual method that gets known in

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd