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

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

I need integrate template to java system, I need integrate template to Java...

I need integrate template to Java system Project Description: We have around 60 files for a java backend and want to implement a template, the system is complete it requires

Create modeling tickets for a city subway system, For this assignment you'l...

For this assignment you'll create some classes for modeling tickets for a city subway system. The type of system we are modeling has these main features: Stations are grouped in

Create sudoku in java, The SudCell Class A single cell in a Sudoku ...

The SudCell Class A single cell in a Sudoku must clearly represent a number from 1 to 9 .  But in a solver context, we need much more.  It isn't enough to say "this c

I want solution to this question., This assignment is based on the principl...

This assignment is based on the principles of clock consistency and associated drifts in a distributed system. You have to create a simulation, running on a single machine, of a si

What are the basic advantages of jms, JMS is asynchronous in nature. Theref...

JMS is asynchronous in nature. Therefore not all the pieces need to be up all the time for the application to function as a whole. Even if the receiver is down the MOM will kept th

Want a script developer, I want a Script developer who will make script for...

I want a Script developer who will make script for me and if you can show good works there are bonuses too. Skills required are Facebook Marketing, Java, Javascript, PHP, and Sc

Logic circuit, Design a logic circuit to convert Gray code to Binary code a...

Design a logic circuit to convert Gray code to Binary code and draw the logic circuit.

Illustrate an example of static variables, Illustrate an example of static ...

Illustrate an example of static variables System. out .println("some text"); -- out is a static variable JOptionPane. showMessageDialog (null, "some text"); -- showMessageDi

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