Create a wall posting class, JAVA Programming

Your FaceBooklet application will use the classes you wrote for Program 3. Start by creating a copy of your Program 3 project with a new name (say, "Program4").

Note that you can complete the requirements of this assignment in any order you like. There is no need to complete items in the order they are listed here. The ordering in this assignment is for presentation purposes only.

Create a WallPosting Class

Create a brand new class called WallPosting that meets the following requirements:

1. It must provide a field called authorName that holds a (string) user name. Note: your wall posting may not contain a user profile field or a shared persistent map field. Only the author's profile name will be stored in this field.

2. It must provide a field called message that holds a (string) message.

3. It most provide a field called date that holds a Date object (defined in the package java.util).

4. It must provide a constructor that takes the author (a UserProfile, not a string) and message as parameters. This constructor should initialize fields using the values provided, and using a brand new Date object to initialize the date field.

5. It must provide getters for the message and date fields.

6. It must provide a getAuthor() method that returns the author's UserProfile (not just the author's name). Hint: your method can contain a shared persistent map as a local variable in order to look up the user profile from the author's name.

7. It must provide its own toString() method that returns an HTML representation of the post. This HTML string should include a thumbnail image of the post's author, the author's name, the date of the post, and the post's message. The layout and arrangements of these contents are up to you, as long as they are all included.

Note that you may not use ZK tags (only HTML tags) or @{...} expressions anywhere in the output of this method.

To format a date, you can create an instance of the class SimpleDateFormat, which provides a convenient method to turn a Date object into a nice text value.

You should handle error situations that may occur here gracefully, such as when the user profile of an author has been deleted between when the posting was added and when the wall is displayed, or if a user has not set a suitable thumbnail image yet.

Posted Date: 3/13/2013 3:57:20 AM | Location : United States







Related Discussions:- Create a wall posting class, Assignment Help, Ask Question on Create a wall posting class, Get Answer, Expert's Help, Create a wall posting class Discussions

Write discussion on Create a wall posting class
Your posts are moderated
Related Questions
i am to find 75% of i clicker score.Each correct answer is worth 2points and an incorrect 1point. Express grade as a percentage (i.e the max is 100%). e.g 1 no i clicker question

In an external JavaScript file write code that, upon form submission, scans the list of courses for a match (case should be insensitive). If a match is found, change the div's back

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

What is the output of the following JavaScript code? name="Ali Akbar"; document.write(name.charAt(4)) ;

Explain the Reading documentation for a class in the class library For instance, let's suppose you need to use the URL class in the java.net package. Through reading the docume

What is Scope of Variable ? Space in that a variable is effective is called as the scope of a variable. In other words we can say area where that variable is available for the

Explain the term - Garbage Collection Java  performs  garbage  collection  and  eliminates  the  need  to  free  objects  explicitly.  When an object  has  no references   to


Explain The java.net package Each package describes a number of classes, interfaces, exceptions, and errors. For instance, the java.net package contains these, classes, interfa

Write a JavaScript program to prompt the user for the radius of a sphere and call function sphereVolume to calculate and display the volume of the sphere in the status bar.