Write a method that reads a line of text from the keyboard a…

Write a method that reads a line of text from the keyboard and then displays the line, but with the first occurrence of hate changed to love. For example, a possible sample dialogue might beEnter a line of text.I hate you.I have rephrased that line to read:I love you.You can assume that the word hate occurs in the input. If the word hate occurs more than once in the line, your program will replace only its first occurrence.

Important note:  Now the you have opened this first question…

Important note:  Now the you have opened this first question, you must hold up your notes paper and show both sides to the camera.  This is the only reference (besides your online access to ESPP) allowed during the exam.  Please note that you are not allowed to have your PBA book open (either digital or hard copy ) during the exam.  —————————————————————————————————————————————————— You are a ride-share driver in New York who earns $250 for a day’s work. You have been offered a one-day ticket to the U.S. Open (also in New York) for $100. As a tennis fan, you value the experience at $300.  Heading to the U.S. Open means missing a day of work. 1.  Should you go to U.S. Open?  Explain using a cost benefit approach in decision-making. 2.  In reference to your example in our first discussion, how did you value your benefits (enjoyment) in dollar terms? You can briefly explain your example. 3. In general, give two reasons why it is challenging to apply cost/benefits to decision-making *For the question,  you will want to define in your own words the terms  marginal cost, marginal benefit, and opportunity cost.