Create a wall posting class, JAVA Programming

Assignment Help:

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.


Related Discussions:- Create a wall posting class

Help !!, I''ve been trying to get this java program to work but im lost and...

I''ve been trying to get this java program to work but im lost and Im stuck ! The factorial of a positive integer N, denoted by N! N!=1*2*...*N Using subprograms and f unctions,c

Terminology, what is mearnt by a variable in java

what is mearnt by a variable in java

Sum of six digits, How do I write a java program that enters a six digit nu...

How do I write a java program that enters a six digit number and takes the sum of the six digits?

Jdbc, creating connection which will authenciate for a password

creating connection which will authenciate for a password

What is an introduction in aop, An introduction permits the user to add new...

An introduction permits the user to add new methods or attributes to an existing class. This can then be explained to an existing class without having to change the structure of th

What is a relational database, What is a Relational Database? Give the name...

What is a Relational Database? Give the names of any three RDBMS software? Database consist of two or more then two tables are called Relational database. Oracle dabatbase S

Hotel online booking system, who can helps me with pseudocode with that top...

who can helps me with pseudocode with that topic above mencioned

Basic difference between java and c++, Both Java and C++ use same syntax an...

Both Java and C++ use same syntax and are Object Oriented, but there are several differences between Java and C++:   1.    Java does not use pointers. Pointers are inherently

Use the constructor, Can we use the constructor, instead of init(), to init...

Can we use the constructor, instead of init(), to initialize servlet? Ans) Yes. Of course you can use the constructor instead of init(). There's nothing to stop you. But you sho

What is externalizable interface, What is Externalizable interface? Ext...

What is Externalizable interface? Externalizable is an interface which have two methods readExternal and writeExternal. These methods give you a control over the serialization

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