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

Multithreading, write a java program implementing multithreading concept in...

write a java program implementing multithreading concept in hotel management

Switch statement in javascript, If there exist multiple conditions, the swi...

If there exist multiple conditions, the switch statement is suggested. It is because only one expression gets evaluated depending on which control jumps directly to the respective

XML File Homework, I need help on java homework. Is it possible to know the...

I need help on java homework. Is it possible to know the shortest possible time to get the solution before giving my commitment

Write a program to perform multiplication and division, Write a program to ...

Write a program to perform multiplication and division in java? Of course Java could also do multiplication and division. Because most keyboards don't have the times and divisi

What is the difference between SOA and a Web Service, Normal 0 ...

Normal 0 false false false EN-US X-NONE X-NONE

Difference between object state and behavior, What is difference between ob...

What is difference between object state and behavior? Ans) If you change the state of an object, you ask it to perform a behavior. An object kept its states in a field e.g. vari

Inner, #question.Hi, i hope my message find you very well. could you help m...

#question.Hi, i hope my message find you very well. could you help me please with this question . provide an example code for an anonymous inner class. Highlight what makes your e

Simon game project, i''m trying to make a code to make the simon says game ...

i''m trying to make a code to make the simon says game and i can''t figure it outt

Create objects of student class by calling default, Create objects of stude...

Create objects of student class by calling default Create objects of student class by calling default, parameterize and copy constructor Call student class different methods on

Student, need help in assignment

need help in assignment

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