Solve the following using Java and the topic is Strategy Design Pattern: Chandler Bing, a character from
Fantastic news! We've Found the answer you've been seeking!
Question:
Solve the following using Java and the topic is Strategy Design Pattern:
Transcribed Image Text:
Chandler Bing, a character from the TV show Friends, is known for his sarcastic humor and witty comebacks. He expresses his humor through 3 different techniques: Sarcasm, Wit and Self Deprecation. Write a Java program that models Chandler's humour throughout the day. Create classes for Humor as well as each humor type. Create a class for Chandler which has an instance of Humor. The default humor technique for Chandler is SarcasmHumor. Every 3 seconds, Chandler should: o Randomly select a humor technique. Assign the technique to his Humor instance. Execute the humor technique. Use the provided Driver to demonstrate his humor. Sample Output Sarcastic Chandler says: I'm glad we're having a rehearsal dinner. I so rarely get to practice my meals before I eat them. Self-deprecating Chandler says: I say more dumb things before 9 A.M. than most people say all day. Self-deprecating Chandler says: I say more dumb things before 9 A.M. than most people say all day. Sarcastic Chandler says: I'm glad we're having a rehearsal dinner. I so rarely get to practice my meals before I eat them. Sarcastic Chandler says: I'm glad we're having a rehearsal dinner. I so rarely get to practice my meals before I eat them. Witty Chandler says: 1's funny, right? What do you know? You're a door. You only like knock-knock jokes. Sarcastic Chandler says: I'm glad we're having a rehearsal dinner. I so rarely get to practice my meals before I eat them. Witty Chandler says: I's funny, right? What do you know? You're a door. You only like knock-knock jokes. Driver public class Driver { public static void main(String[] args) { Chandler c = new Chandler(); }} Chandler Bing, a character from the TV show Friends, is known for his sarcastic humor and witty comebacks. He expresses his humor through 3 different techniques: Sarcasm, Wit and Self Deprecation. Write a Java program that models Chandler's humour throughout the day. Create classes for Humor as well as each humor type. Create a class for Chandler which has an instance of Humor. The default humor technique for Chandler is SarcasmHumor. Every 3 seconds, Chandler should: o Randomly select a humor technique. Assign the technique to his Humor instance. Execute the humor technique. Use the provided Driver to demonstrate his humor. Sample Output Sarcastic Chandler says: I'm glad we're having a rehearsal dinner. I so rarely get to practice my meals before I eat them. Self-deprecating Chandler says: I say more dumb things before 9 A.M. than most people say all day. Self-deprecating Chandler says: I say more dumb things before 9 A.M. than most people say all day. Sarcastic Chandler says: I'm glad we're having a rehearsal dinner. I so rarely get to practice my meals before I eat them. Sarcastic Chandler says: I'm glad we're having a rehearsal dinner. I so rarely get to practice my meals before I eat them. Witty Chandler says: 1's funny, right? What do you know? You're a door. You only like knock-knock jokes. Sarcastic Chandler says: I'm glad we're having a rehearsal dinner. I so rarely get to practice my meals before I eat them. Witty Chandler says: I's funny, right? What do you know? You're a door. You only like knock-knock jokes. Driver public class Driver { public static void main(String[] args) { Chandler c = new Chandler(); }}
Expert Answer:
Answer rating: 100% (QA)
Based on the information provided you want to implement a Java program that models Chandler Bings humor using the Strategy Design Pattern Heres how you can approach this Define a Humor interface with ... View the full answer
Related Book For
Introduction to Operations Research
ISBN: 978-1259162985
10th edition
Authors: Frederick S. Hillier, Gerald J. Lieberman
Posted Date:
Students also viewed these operating system questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Design a Java class that represents a cache with a fixed size. It should support operations like add, retrieve, and remove, and it should evict the least recently used item when it reaches capacity.
-
Esther earned 528.00 for the week. If she saved 128.00, how many percent of her earnings for the week did she save?
-
J&J Enterprises sells paper cups to fast-food franchises. On January 1, 2019, J&J had 5,000 cups on hand, for which it had paid $0.10 per cup. During 2019, J&J made the following purchases and sales:...
-
The Shop at Home Network sells various household goods during live television broadcasts. The company owns several warehouses to hold many of the goods it sells, but also leases extra warehouse space...
-
When should we use packaging? Discuss its pros and cons.
-
The cost of goods sold computations for Target Company and Caesar Company are shown below. Instructions(a) Compute inventory turnover and days in inventory for each company.(b) Which company moves...
-
Identify the type of fund in which each activity is recorded: 1 ) The city receives a grant from the federal government to institute a meal delivery program for senior citizens. 2 ) To remedy a...
-
Sundream Travel Agency Ltd. is a company that sells vacation packages and has a new Chief Executive Officer (CEO) who is reviewing the draft December 31 year-end financial statements prepared by the...
-
1. The word settled hasmore than one meaning. In which one of the following sentencesis settled used incorrectly? A. Dust settled slowly as the truck moved down theroad. B. As far as they were...
-
Alin Co. purchases a building for $300,000 and pays an additional $30,000 for title fees and lawyer fees. Alin also pays $20,000 in renovations, including painting, carpet, lighting, etc.At what...
-
Bindi's Bridal has provided the following yearly financial results: Gross Sales: $162,750 Net Sales: $128,550 Opening Inventory: $85,950 Advertising Expenses: $8,200 Sales Salaries: $15,700 Rent:...
-
An incident light ray strikes a mirror with an angle of 58 to the surface of the mirror. What is the angle of reflection of the reflected ray? 0,=
-
What minimum number of 60 W lightbulbs must be connected in parallel to a single 180 V household circuit to trip a 36.0 A circuit breaker? lightbulbs Need Help? Read It Submit Answer
-
5. Light of wavelength 632 nm is incident normally on two narrow parallel slits separated by 0.600 mm (note carefully the number of significant figures). Determine the first three locations on one...
-
Find an income statement or balance sheet for a business. Review the accounting concepts and the income statement or balance sheet to answer the following questions: How is the business performing...
-
During registration at Tech every quarter, students in the Department of Management must have their courses approved by the departmental advisor. It takes the advisor an average of 4 minutes...
-
Reconsider the model given in Prob. 13.3-3. What are the KKT conditions for this model? Use these conditions to determine whether (x1, x2) = (0, 10) can be optimal.
-
Consider the example for applying SUMT given in Sec. 13.9. (a) Show that (x1, x2) = (1, 2) satisfies the KKT conditions. (b) Display the feasible region graphically, and then plot the locus of points...
-
Warren Buffy is an enormously wealthy investor who has built his fortune through his legendary investing acumen. He currently has been offered three major investments and he would like to choose one....
-
According to the pecking order theory: A. new debt is preferable to new equity. B. new debt is preferable to internally generated funds. C. new equity is always preferable to other sources of capital.
-
According to the static trade-off theory: A. debt should be used only as a last resort. B. companies have an optimal level of debt. C. the capital structure decision is irrelevant.
-
All else equal, the use of long-maturity debt is expected to be greater in those markets in which: A. inflation is low. B. capital markets are passive and illiquid. C. the legal systems protection of...
Study smarter with the SolutionInn App