Question: Complete the program, MethodLab.java, by adding the methods specified in parts 1, 2, & 3 below: 1. Write a void method called greetingwitch takes three

Complete the program, MethodLab.java, by adding the methods specified in parts 1, 2, & 3 below:

1. Write a void method called greetingwitch takes three String parameters and formats and prints

a title, first name, and last name in the following format and prints it out:

blank line

Dear <first name> <last name>,</p> <p>blank line</p> <p>2. Write a method called maxthat takes two int parameters, num1 and num2, and returns the larger</p> <p>of the two integers.</p> <p>3. Write a method called sumTo that takes two int parameters, num1 and num2 and returns the sum</p> <p>of all numbers from the smaller number to the larger number, inclusive. (i.e. given 2 and 4, returns</p> <p>9. Because 2 + 3 + 4 = 9) (if given 4 and 2, returns 9 as well. Because 2 + 3 + 4 = 9)</p> <p><strong>USE THE GUIDE LINE BELOW </strong></p> <p> </p> <pre>import java.io.*; import java.util.Scanner; public class MethodLab { public static void main(String[] args) { // variable declarations for part 1 String title; String firstName; String lastName; Scanner in = new Scanner(System.in); // prompt for input for part 1 System.out.print("Enter a title:"); title = in.next(); System.out.print("Enter your first name:"); firstName = in.next(); System.out.print("Enter your last name:"); lastName = in.next(); // call the method for part 1 greeting(title, firstName, lastName); // variable declarations for part 2 int number1; int number2; // user prompts for part 2 System.out.print("Enter first number:"); number1 = in.nextInt(); System.out.print("Enter second number:"); number2 = in.nextInt(); // call the method for part 2 inside the println statement System.out.println("The largest number is " + max(number1, number2)); //Call the method for part 3 inside the println statement System.out.println("The sum of " + number1 + " to " + number2 + " is " + sumTo(number1, number2)); in.close(); } /******************** greeting method goes here*********************/ /***********************end of method*************************/ /******************** max method goes here*********************/ /***********************end of method*************************/ /******************** sumTo method goes here*********************/ /***********************end of method*************************/ } </pre> </div> <div class="question-answer-divider"></div> <section class="answerHolder" itemscope itemtype="http://schema.org/Answer"> <div class="answerHolderHeader"> <h2>Step by Step Solution</h2> <div class="answerReviews"> <div class="starIcon"> </div> </div> </div> <div class="questionProperties"> <p>There are 3 Steps involved in it</p> <div class="cart-flex"> <div class="cart cart1"> 1 Expert Approved Answer </div> </div> </div> <div class="step org_answer"> <span class="view_solution_btn view-solution-btn-cursor"> <strong class="step-heading step-1">Step: 1 <span>Unlock <i class="fa-solid fa-lock"></i></span></strong> </span> <img src="https://www.solutioninn.com/includes/images/document_product_info/blur-text-image.webp" class="blured-ans-image" width="759" height="271" alt="blur-text-image" decoding="async" fetchpriority="high"> <div class="step1Popup"> <span class="heading">Question Has Been Solved by an Expert!</span> <p>Get step-by-step solutions from verified subject matter experts</p> <button class="view_solution_btn step1PopupButton">View Solution</button> </div> </div> <div class="step"> <span class="view_solution_btn view-solution-btn-cursor"> <strong class="accordion step-heading">Step: 2 <span>Unlock <i class="fa-solid fa-lock"></i></span></strong> </span> </div> <div class="step"> <span class="view_solution_btn view-solution-btn-cursor"> <strong class="accordion step-heading">Step: 3 <span>Unlock <i class="fa-solid fa-lock"></i></span></strong> </span> </div> </section> <section class="relatedQuestion"> <h3>Students Have Also Explored These Related Databases Questions!</h3> <div class="relatedQuestionSliderHolder"> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/complete-the-program-methodlabjava-by-adding-the-methods-specified-in-13404767" > Complete the program, MethodLab.java, by adding the methods specified in parts 1, 2, & 3 below: 1. Write a void method called greetingwitch takes three String parameters and formats and prints a... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/complete-the-program-methodlabjava-by-adding-the-methods-specified-in-13433744" > Complete the program, MethodLab.java, by adding the methods specified in parts 1, 2, & 3 below: 1. Write a void method called greeting which takes three String parameters and formats and prints a... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/help-rewrite-without-using-to-compare-public-class-starbucksaccount-9253486" > Help! Rewrite without using == to compare. public class StarbucksAccount { //Do not modify the attributes or add new ones. private String firstName; private String lastName; private String... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/these-are-all-the-templates-you-do-not-have-to-15163937" > These are all the templates. You do not have to do any of the bonus or extra stuff. I need everything in java and this is all one problem just with separate parts so I need it all answered. Part 1 In... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/part-one-chapter-9-lab-text-processing-and-wrapper-classes-12474482" > Part one: Chapter 9 Lab Text Processing and Wrapper Classes Lab Objectives Use methods of the Character class and String class to process text Be able to use the StringTokenizer and StringBuffer... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/i-only-need-answers-for-31-34-35-43-53-17792564" > I only need answers for 3.1, 3.4, 3.5, 4.3, 5.3, 5.5, 5.6, 6.3, 6.8 (b, c, f, h, k, m), and 7.2. 1 Submission Instructions Note that for each homework assignment, only some of the exercises will be... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/i-have-the-majority-done-but-i-am-having-trouble-12491221" > **I HAVE THE MAJORITY DONE, BUT I AM HAVING TROUBLE GETTING THE ENTIRE OUTPUT THE ASSIGNMENT ASKS ME TO HAVE. PLEASE HELP, THANKS.** --------------------------------------------------------------... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/i-have-the-majority-done-but-i-am-having-trouble-12527565" > **I HAVE THE MAJORITY DONE, BUT I AM HAVING TROUBLE GETTING THE ENTIRE OUTPUT THE ASSIGNMENT ASKS ME TO HAVE. PLEASE HELP, THANKS.** PLEASE MAKE SURE IT RUNS CORRECTLY :)... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/for-this-project-you-will-be-writing-a-java-program-13606844" > For this project you will be writing a java program with methods for encrypting and decrypting text. Credits: This project was taken from Microsoft MOOC: Learn to program in Java. Note: Please... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/i-have-already-completed-the-assignments-but-i-still-need-13574276" > I have already completed the assignments but I still need help with the project. Here are the assignments: Assignment 1: public class Sizes { public static void main(String[] args) {... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/national-co-a-company-with-a-25-debttoequity-ratio-has-534088" > National Co., a company with a 25% debt-to-equity ratio, has a weighted average cost of capital of 9%. The firm is growing at a constant rate and does not issue any preferred shares. The after-tax... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/does-a-shareholder-whether-preferred-or-common-have-a-right" > Does a shareholder, whether preferred or common, have a right to a dividend? Explain. </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/which-is-correct-about-the-special-rmd-rule-for-surviving-27963771" > Which is correct about the special RMD rule for surviving spouses? The rule applies only to beneficiaries of defined benefit plans. The rule applies only to surviving spouses subject to the five -... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/questions/middle-managers-in-an-organization-are-unlikely-to-try-to-14654367" > Middle managers in an organization are unlikely to try to block or undermine senior management directives if they believe that those proposals will not work well. True false question. True False </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/principles-of-macroeconomics/holding-national-saving-constant-does-an-increase-in-net-capital-2132079" > Holding national saving constant, does an increase in net capital outflow increase, decrease, or have no effect on a countrys accumulation of domestic capital? </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/principles-of-macroeconomics/an-article-in-usa-today-december-16-2004-began-president-2132081" > An article in USA Today (December 16, 2004) began President Bush said Wednesday that the White House will shore up the sliding dollar by working to cut record budget and trade deficits. a. According... </a> </div> <div class="relatedQuestionCart "> <p class="heading">Q: </p> <a class="relatedQuestionText" href="/study-help/principles-of-macroeconomics/international-trade-in-each-of-the-following-products-has-increased-2132078" > International trade in each of the following products has increased over time. Suggest some reasons this might be so. a. wheat b. banking services c. computer software d. automobiles </a> </div> </div> <nav class="navigationButtons"> <a class="previousQuestionButton" href="/study-help/questions/int-arr-1-2-13841056">Previous Question</a> <a class="nextQuestionButton" href="/study-help/questions/what-is-the-oodp-class-client-component-comp-13841058">Next Question</a> </nav> </section> </main> <aside class="expertRight"> <section class="relatedBook" style="margin-bottom:40px; width: 100%;" > <div class="bookHolder" > <div class="relatedBookHeading" > <h2 class="heading">Recommended Textbook</h2> </div> <div class="bookMainInfo" > <div class="bookImage" style="width: 100px !important; min-width: 100px; flex-shrink: 0; margin-right: 20px;"> <a href="/textbooks/database-principles-programming-and-performance-2nd-edition-9781558605800"> <img src="https://dsd5zvtm8ll6.cloudfront.net/si.question.images/book_images/6507e5d33bfce_55031.jpg" width="100" height="131" alt="Database Principles Programming And Performance" loading="lazy" style="width: 100px !important;"> </a> <a href="/textbooks/computer-science-arcore-2792" style="margin-top: 8px; display: block; text-align: left;">More Books</a> </div> <div class="bookInfo" style="text-align: left;"> <span class="bookTitle" style="text-align: left;"> <a href="/textbooks/database-principles-programming-and-performance-2nd-edition-9781558605800" style="text-align: left;"> Database Principles Programming And Performance </a> </span> <div class="bookMetaInfo" style="text-align: left;"> <p class="bookAuthor" style="text-align: left;"> <b>Authors:</b> <span>Patrick O'Neil, Elizabeth O'Neil</span> </p> <p class="bookEdition" style="text-align: left;"> 2nd Edition </p> <p class="bookEdition" style="text-align: left;"> 1558605800, 978-1558605800 </p> </div></div></div> </div> </section> <div class="post-question-section"> <div class="description-question-section"> <span class="post-question-section-title">Ask a Question and Get Instant Help!</span> </div> <div class="text-area-post-question"> <form action="/study-help/post-question?ref=search" method="post" enctype="multipart/form-data"> <textarea rows="4" class="form-control form-posting-margin" name="textarea-question-content" id="textarea-question-content" placeholder="Type Your Question ...."></textarea> <button type="submit" class="btn btn-sm btn-submit-post-question text-center">Get Answer</button> </form> </div> </div> </aside> </div> </div> <div class="promo items-center justify-center hidden"> <div class="app_promo"> <span class="app_promo_dismiss"> <i class="fa-solid fa-x"></i> </span> <div class="app-button"> <div class="image-wrapper"> <img width="30" height="30" src="https://www.solutioninn.com/includes/images/rewamp/common/mobile-app-logo.png" decoding="async" fetchpriority="high" alt="SolutionInn App Logo"> <strong>Study Help</strong> </div> <button class="app_promo_action redirection" data-question-open-url='q_id=13841057&q_type=2'> Open in App </button> </div> </div> </div> </div> </div> <div class="blank-portion"></div> <footer> <div class="container footerHolder"> <div class="footerLinksFlex"> <div class="footerLinksCol col-md-3 col-lg-3 col-sm-6 col-6"> <p>Services</p> <ul> <li><a href="/site-map">Sitemap</a></li> <li><a href="/fun/">Fun</a></li> <li><a href="/study-help/definitions">Definitions</a></li> <li><a href="/tutors/become-a-tutor">Become Tutor</a></li> <li><a href="/books/used-textbooks">Used Textbooks</a></li> <li><a href="/study-help/categories">Study Help Categories</a></li> <li><a href="/study-help/latest-questions">Recent Questions</a></li> <li><a href="/study-help/questions-and-answers">Expert Questions</a></li> <li><a href="/clothing">Campus Wear</a></li> <li><a href="/sell-books">Sell Your Books</a></li> </ul> </div> <div class="footerLinksCol col-md-3 col-lg-3 col-sm-6 col-6"> <p>Company Info</p> <ul> <li><a href="/security">Security</a></li> <li><a href="/copyrights">Copyrights</a></li> <li><a href="/privacy">Privacy Policy</a></li> <li><a href="/conditions">Terms & Conditions</a></li> <li><a href="/solutioninn-fee">SolutionInn Fee</a></li> <li><a href="/scholarships">Scholarship</a></li> <li><a href="/online-quiz">Online Quiz</a></li> <li><a href="/study-feedback">Give Feedback, Get Rewards</a></li> </ul> </div> <div class="footerLinksCol col-md-3 col-lg-3 col-sm-6 col-6"> <p>Get In Touch</p> <ul> <li><a href="/about-us">About Us</a></li> <li><a href="/support">Contact Us</a></li> <li><a href="/career">Career</a></li> <li><a href="/jobs">Jobs</a></li> <li><a href="/support">FAQ</a></li> <li><a href="https://www.studentbeans.com/en-us/us/beansid-connect/hosted/solutioninn" target="_blank" rel="noopener nofollow">Student Discount</a></li> <li><a href="/campus-ambassador-program">Campus Ambassador</a></li> </ul> </div> <div class="footerLinksCol col-md-3 col-lg-3 col-sm-6 col-12"> <p>Secure Payment</p> <div class="footerAppDownloadRow"> <div class="downloadLinkHolder"> <img src="https://dsd5zvtm8ll6.cloudfront.net/includes/images/rewamp/common/footer/secure_payment_method.png" class="img-fluid mb-3" width="243" height="28" alt="payment-verified-icon" loading="lazy"> </div> </div> <p>Download Our App</p> <div class="footerAppDownloadRow"> <div class="downloadLinkHolder mobileAppDownload col-md-6 col-lg-6 col-sm-6 col-6 redirection" data-id="1"> <img style="cursor:pointer;" src="https://dsd5zvtm8ll6.cloudfront.net/includes/images/rewamp/home_page/google-play-svg.svg" alt="SolutionInn - Study Help App for Android" width="116" height="40" class="img-fluid mb-3 " loading="lazy"> </div> <div class="downloadLinkHolder mobileAppDownload col-md-6 col-lg-6 col-sm-6 col-6 redirection" data-id="2"> <img style="cursor:pointer;" src="https://dsd5zvtm8ll6.cloudfront.net/includes/images/rewamp/home_page/apple-store-download-icon.svg" alt="SolutionInn - Study Help App for iOS" width="116" height="40" class="img-fluid mb-3" loading="lazy"> </div> </div> </div> </div> </div> <div class="footer-bottom"> <p>© 2026 SolutionInn. All Rights Reserved</p> </div></footer> <script> window.addEventListener("load",function(){jQuery(document).ready(function(t){ // Clarity tracking (function(c,l,a,r,i,t,y){ c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)}; t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i; y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y); })(window, document, "clarity", "script", "sjv6tuxsok"); // Helper to read a cookie by name function getCookie(name) { return document.cookie .split('; ') .map(v => v.split('=')) .reduce((acc, [k, val]) => (k === name ? decodeURIComponent(val || '') : acc), ''); } // Read cookies var si = getCookie('si_u_id'); var uid = getCookie('u_id'); var zen = getCookie('zenid'); // Send to Clarity if (si) clarity('set', 'si_u_id', si); if (uid) clarity('set', 'u_id', uid); if (zen) clarity('set', 'zenid', zen); clarity('set', 'ip_address', '216.73.216.134'); t.ajax({type:"POST",url:"/",data:{trackUserActivity:!0,reqUri:document.URL,referer:document.referrer},success:function(t){}})})},!1),window.addEventListener("load",function(){jQuery(document).ready(function(t){t.ajax({type:"POST",url:"/",data:{insertCrawler:!0,reqUri:document.URL,parseTime:"0.056",queryTime:"0.01654768548584",queryCount:"30"},success:function(t){}})})},!1),window.addEventListener("load",function(){jQuery(document).ready(function(){function t(t="",n=!1){var i="itms-apps://itunes.apple.com/app/id6462455425",e="openApp://action?"+t;isAndroid()?(setTimeout(function(){return window.location="market://details?id=com.solutioninn.studyhelp",!1},25),window.location=e):isIOS()?(setTimeout(function(){return window.location=i,!1},25),window.location=e):(i="https://apps.apple.com/in/app/id6462455425",n&&(i="https://play.google.com/store/apps/details?id=com.solutioninn.studyhelp"),window.open("about:blank","_blank").location.href=i)}jQuery("#appModal").modal("show"),jQuery(".download-app-btn").click(function(){t(jQuery(this).attr("data-question-open-url"))}),jQuery(".redirection").click(function(){var n=jQuery(this).attr("data-question-open-url"),i=jQuery(this).attr("data-id");void 0!=n?1==i?t(n,!0):t(n,!1):1==i?t("",!0):t("",!1)}),jQuery(".app-notification-close").click(function(){jQuery(".app-notification-section").css("visibility","hidden");var t=new FormData;t.append("hide_notification",!0),jQuery.ajax({type:"POST",url:"/",data:t,cache:!1,contentType:!1,processData:!1,beforeSend:function(){},success:function(t){location.reload()}})})})},!1); </script> </body> </html>