Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

need help asap java COSC 210 -Object Oriented and UI Programming Assignment 4 Problem Statement Specialized boards/forums, such as stack individuals to ask technology questions

need help asap image text in transcribed
image text in transcribed
image text in transcribed
java
COSC 210 -Object Oriented and UI Programming Assignment 4 Problem Statement Specialized boards/forums, such as stack individuals to ask technology questions communication in a forum is typically perto desired to provide reports of all communic report is to be printed on an that has a fix w word wrapped format. Furthermore, answers orums, such as stack Overflow and techiest forums, provide a means for chnology questions Others may the post their answers. All in is typically performed on-line and recorded. For this assignment it is of all communication that has been recorded in a forum. Since the per that has a fix width, the text of a post needs to be printed in a hermore, answers need to be printed with 4 space indentation. Assignment Forum No Questions: 3 Owned by David T Smith Questions Or blank by B. Blue on 2/16/15 08:30pm When printing the time logs does it matter we have a you want a blank space in the overtime column? we have a 0 or do Re: 0 Or blank by D. Smith on 2/26/15 08:32pm I want to see a blank printed when the number of hours 15 zero. Consider using in the formats ng and using the ternary operator when boys disa value of the argument. Re: 0 or blank by J. Green 2/16/15 08:50pm An if could be used, but I think: n 0 ? String.valueof(n) Would be simpler Problems with formatting. by C. Hope on 2/12/15 01:52 pm I can't get normal hours to print. My code anside my pre print. My co h y print method: System.out.printf("Normal Hours worked: 850d ", timeLog.getNormal Hours()); Re: Problems with formatting. by D. Smith on 2/13/15 04:52 am Not sure what your problem is. The $500 looks oddSh be more like 85d? That is only 5 digits wide not 50 Reminder - javadoc and formatting by D. Smith on 2/07/15 04:59pm Reminder, Make sure you have javadoc before the class declaration and before every public method. Make sure you Use good formatting. For this report: The number of columns antent of the question questi must be separated into paragraphs he word wrapped. A new character (.e. n) is used to separ er must have a lett margin which is a 4 space indent from its que truncate the length of the subject line to the remaining width of paragraph word wrapped An answer must have a len If needed, truncate the length of Likewise for the "by" line. a te be by line lists only the member's first initial and last assignment, a class called RandomDate is available on the To assist in this assignment method next which will generate simulation data where the cost class has a static method next which will generate simu LocalDate Time is 2 minutes to one hour later than the previous call er. The TextWrapper is to have two static methods Additional specification: Create a class TextWrapper. The TextWrapper is to be rint Wrap/String text, int leftMargin, int rightMargin! print Centered(String text, int rightMargin) print the text as a set of word wrapped paragraphs between the left and print Wrap is to print the text as a set of word wrapped na abt column margins. Text composing paragraphs are separated by new li by new line characters in the input text parameter. When printing the paragraphs are separated by blank lines The printDetail Report method in forum must use this class to print the word wrapped content. printCentered is to print the text on a line centered between a left margin of and the specified right margin. When printing the reports, use this method to print the first header lines. Note that since these methods are static, do not create an instance of TextWrapper to en them. Simply call the methods using the class name. Use RandomDate for the date of the questions and replies. Do not pass it in as an argument in the constructor. Instead create a new Random Date instance inside the constructor. In the forum define an addQuestion method which takes as an argument a member, a subiect line, and a content string (which could be very long). Have the method create an instance of a question and add it to the array. Return the instance of the question. (this will allow the test program to add replies to the replies) In the question class provide an addAnwe method which takes as an argum Have the method create an instance of an answer and add it member and a content string. Have as subject line to generate the subject line for the answer. to the array. Use the questions subje ng practices (e.g., naming conventions, javadoc, indentation Abide by good programming prac use of braces, etc.). No print should appear after the 60 column. Write a test program to test the Text Gram to test the TextWrapper class. write a test program to thoroughly test your forum classes. You do not need to use the example above (if you do the dates will at least be different). However, make sure your example has: At least 3 posts to the forum One post to the forum has no replies One post to the forum has at least 2 replies For replies use a subject line the subject line to which it is a reply pre-pended Print the report One forum is sufficient Bonus 10 points. Allow answers to be posted to answers. That is answer to answers to answers, and so forth. The report is to show a answers, and so forth. The report is to show answers to answers indented a additional 4 spaces to the parent answer. The title is the have RE: prepende answer. wer. The title is the have RE: prepended to the parent posted to answers. That is answer to answer, answer COSC 210 -Object Oriented and UI Programming Assignment 4 Problem Statement Specialized boards/forums, such as stack individuals to ask technology questions communication in a forum is typically perto desired to provide reports of all communic report is to be printed on an that has a fix w word wrapped format. Furthermore, answers orums, such as stack Overflow and techiest forums, provide a means for chnology questions Others may the post their answers. All in is typically performed on-line and recorded. For this assignment it is of all communication that has been recorded in a forum. Since the per that has a fix width, the text of a post needs to be printed in a hermore, answers need to be printed with 4 space indentation. Assignment Forum No Questions: 3 Owned by David T Smith Questions Or blank by B. Blue on 2/16/15 08:30pm When printing the time logs does it matter we have a you want a blank space in the overtime column? we have a 0 or do Re: 0 Or blank by D. Smith on 2/26/15 08:32pm I want to see a blank printed when the number of hours 15 zero. Consider using in the formats ng and using the ternary operator when boys disa value of the argument. Re: 0 or blank by J. Green 2/16/15 08:50pm An if could be used, but I think: n 0 ? String.valueof(n) Would be simpler Problems with formatting. by C. Hope on 2/12/15 01:52 pm I can't get normal hours to print. My code anside my pre print. My co h y print method: System.out.printf("Normal Hours worked: 850d ", timeLog.getNormal Hours()); Re: Problems with formatting. by D. Smith on 2/13/15 04:52 am Not sure what your problem is. The $500 looks oddSh be more like 85d? That is only 5 digits wide not 50 Reminder - javadoc and formatting by D. Smith on 2/07/15 04:59pm Reminder, Make sure you have javadoc before the class declaration and before every public method. Make sure you Use good formatting. For this report: The number of columns antent of the question questi must be separated into paragraphs he word wrapped. A new character (.e. n) is used to separ er must have a lett margin which is a 4 space indent from its que truncate the length of the subject line to the remaining width of paragraph word wrapped An answer must have a len If needed, truncate the length of Likewise for the "by" line. a te be by line lists only the member's first initial and last assignment, a class called RandomDate is available on the To assist in this assignment method next which will generate simulation data where the cost class has a static method next which will generate simu LocalDate Time is 2 minutes to one hour later than the previous call er. The TextWrapper is to have two static methods Additional specification: Create a class TextWrapper. The TextWrapper is to be rint Wrap/String text, int leftMargin, int rightMargin! print Centered(String text, int rightMargin) print the text as a set of word wrapped paragraphs between the left and print Wrap is to print the text as a set of word wrapped na abt column margins. Text composing paragraphs are separated by new li by new line characters in the input text parameter. When printing the paragraphs are separated by blank lines The printDetail Report method in forum must use this class to print the word wrapped content. printCentered is to print the text on a line centered between a left margin of and the specified right margin. When printing the reports, use this method to print the first header lines. Note that since these methods are static, do not create an instance of TextWrapper to en them. Simply call the methods using the class name. Use RandomDate for the date of the questions and replies. Do not pass it in as an argument in the constructor. Instead create a new Random Date instance inside the constructor. In the forum define an addQuestion method which takes as an argument a member, a subiect line, and a content string (which could be very long). Have the method create an instance of a question and add it to the array. Return the instance of the question. (this will allow the test program to add replies to the replies) In the question class provide an addAnwe method which takes as an argum Have the method create an instance of an answer and add it member and a content string. Have as subject line to generate the subject line for the answer. to the array. Use the questions subje ng practices (e.g., naming conventions, javadoc, indentation Abide by good programming prac use of braces, etc.). No print should appear after the 60 column. Write a test program to test the Text Gram to test the TextWrapper class. write a test program to thoroughly test your forum classes. You do not need to use the example above (if you do the dates will at least be different). However, make sure your example has: At least 3 posts to the forum One post to the forum has no replies One post to the forum has at least 2 replies For replies use a subject line the subject line to which it is a reply pre-pended Print the report One forum is sufficient Bonus 10 points. Allow answers to be posted to answers. That is answer to answers to answers, and so forth. The report is to show a answers, and so forth. The report is to show answers to answers indented a additional 4 spaces to the parent answer. The title is the have RE: prepende answer. wer. The title is the have RE: prepended to the parent posted to answers. That is answer to

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

25.0 m C B A 52.0 m 65.0 m

Answered: 1 week ago