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

Different messaging paradigms jms supports, What are the different messagin...

What are the different messaging paradigms JMS supports? Ans) Publish and Subscribe i.e. pub/suc and Point to Point i.e. p2p.

Create an executable application in java, This assignment requires you to d...

This assignment requires you to design, implement and test a program using Java features from the first half of the subject content. You are required to implement in Java all the c

List the keywords which are used in java 1.1, List the keywords which are u...

List the keywords which are used in java 1.1? The list of keywords which are used in java 1.1 are given below: Keyword Purpose boole

What is casting, What is casting? There are two types of casting, casti...

What is casting? There are two types of casting, casting among primitive numeric types and casting among object references. Casting among numeric types is used to convert large

Explain about the dynamic behavior of core java, This language was designed...

This language was designed to adapt the changing environment and behavior. New methods and instance variables can be added to the client side without any major changes happening at

What is heuristic, What is heuristic? Heuristic is a procedure which co...

What is heuristic? Heuristic is a procedure which commonly, but not always, works or that provides nearly the right answer.

Describe features of spring, Here are some features of spring:- ? Lightw...

Here are some features of spring:- ? Lightweight: spring is lightweight when it comes to size and transparency. The essential version of spring framework is around 1MB. And t

Application for software tracking system, Talent agencies like ICM, CAA and...

Talent agencies like ICM, CAA and Paradigm represent writers, directors and actors (among other talent).  These agencies take in hundreds of millions of dollars a year collecting 1

Describe what is meant by a constructor in java, Question: (a) Describe...

Question: (a) Describe what is meant by a ‘constructor' in Java. Use a simple example to illustrate your answer. (b) Differentiate between a class method and an instance me

Roster entries in chat application, The roster lets you keep track of the a...

The roster lets you keep track of the availability ("presence") of other users. A roster also allows you to organize users into groups such as "Friends" and "Co-workers". Other IM

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