Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

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.

Java, Programming

  • Category:- Java
  • Reference No.:- M9528216

Have any Question?


Related Questions in Java

Can someone kindly help me to consider whether java

Can someone kindly help me to consider whether Java provides the facility of operator overloading? If it does, may you kindly describe how overloading operators can be accomplished? If not, may you kindly describe why yo ...

In relation to javaa what is constructor the purpose of

(In relation to Java) A. What is constructor? the purpose of default constructor? B. How do you get a copy of the object but not the reference of the object? C. What are static variables and instance variables? D. Compar ...

Can someone help me please with those question1what is the

Can someone help me please with those question 1:what is the best data type for student id datatime,currency,number,decimal 2:which relationshipis preferable? one to one,one to many,many to many 3:if you add table A's pr ...

Solving 2nd degree equationsbull write the following java

Solving 2nd degree equations • Write the following Java methods • boolean real-sols(double a, double b, double c): it returns true if the 2nd degree equation ax2 + bx + c has real solutions • double solution1(double a, d ...

Simple order processing systemquestion given the classes

Simple Order Processing System Question: Given the classes Ship (with getter and setter), Speedboat, and SpeedboatTest. Answer the following questions: Refine the whole application (all classes) and create Abstract class ...

Assessment socket programmingtaskwrite a java gui program

Assessment: Socket Programming Task Write a JAVA GUI program that would facilitate text chatting/exchanging between two or multiple computers over the network/internet, using the concept of JAVA socket programming. If yo ...

Fundamentals of operating systems and java

Fundamentals of Operating Systems and Java Programming Purpose of the assessment (with ULO Mapping) This assignment assesses the following Unit Learning Outcomes; students should be able to demonstrate their achievements ...

Assessment socket programmingtaskwrite a java gui program

Assessment: Socket Programming Task Write a JAVA GUI program that would facilitate text chatting/exchanging between two or multiple computers over the network/internet, using the concept of JAVA socket programming. If yo ...

Applied software engineering assignment 1 -learning

Applied Software Engineering Assignment 1 - Learning outcomes - 1. Understand the notion of software engineering and why it is important. 2. Analyse the risk factors associated with phases of the software development lif ...

Answer the following question whats the difference public

Answer the following Question : What's the difference public inheritance and private inheritance? What can derived classes inherit from base classes? What cannot be inherited from base classes?

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As