Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

.java ASAP please 3 For credit, the program MUST include a sample run in a block comment below the last curly brace (below the program

.java ASAP please image text in transcribed
image text in transcribed
image text in transcribed
3 For credit, the program MUST include a sample run in a block comment below the last curly brace (below the program code). If this is not included, then the program is not complete. The program could be resubmitted for late credit if turned in with the sample run. A. Write the Java program to implement a menu: Up to: Includes introductory Standard (**) block comment that includes: 2 Name of project, description, Input, Computation, Output, And, name, and date in standard format Successfully includes appropriate comments for each method of code Up to 3 Within a block comment above each method: (5 for each missing) Includes the name of the method and a short description Includes @param parameter Name : description for each parameter Includes @return varName: description for those methods that return a value Method: getPos Double(String prompt) Passes the prompt to this method Uses a while loop to ensure that only a positive (greater than zero) double value is returned back to the place where it was called AND USES THIS VALUE BACK IN MAIN Method: getPosInt(String prompt) 3 Passes the prompt to this method Uses a while loop to ensure that only a positive (greater than zero) integer value is returned back to the place where it was called AND USES THIS VALUE BACK IN MAIN Indentation is standard 2 IN MAIN: Program uses a while or do loop to loop until the exit choice is selected 2 IN MAIN: Program displays the menu and based on the selection made, performs that part of the switch statement Program computes results and calculates correctly. 3 Includes blank lines in both the program and output for readability 2 Z. Bahorski, 2021, COSC 111 2 Extra credit (1 point - Add a time stamp printed to the beginning of execution and to the end as shown.) Total points possible 22 Liquid Unit Measure Converter by Your Name This program will convert between Liters and Gallons. Choose the conversion from the menu. Choose from the menu: 1: Liters to Gallons 2: Gallons to Liters 3: Quit the program Enter your choice: 1 1 has been entered Converting Liters to Gallons Enter number of Liters: 3.846 3.846 Liters is: 1.016005713369439 Gallons. Choose from the menu: 1: Liters to Gallons 2: Gallons to Liters 3: Quit the program Enter your choice: 2 2 has been entered Converting Gallons to Liters Enter number of Gallons: 5 5.0 Gallons 13: 18.92705892 Liters. Choose from the menu: 1: Liters to Gallons 2: Gallons to Liters 3: Quit the program Enter your choice: 2 2 has been entered Converting Gallons to Litera Enter number of Gallons: 0.26417205235 014843 0.26417205235814845 Gallons 13: 1.0 Litera. Converting Gallons to Liters Enter number of Gallons: 5 5.0 Gallons is: 18.92705892 Liters. Choose from the menu: 1: Liters to Gallons 2: Gallons to Liters 3: Quit the program Enter your choice: 2 2 has been entered Converting Gallons to Liters Enter number of Gallons: 0.26417205235814843 0.26417205235814845 Gallons is: 1.0 Liters. II Choose from the menu: 1: Liters to Gallons 2: Gallons to Liters 3: Quit the program Enter your choice: 1 1 has been entered Converting Liters to Gallons Enter number of Liters: 3.785411784 3.785411784 Liters is: 1.0 Gallong

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Database Design Query Formulation And Administration Using Oracle And PostgreSQL

Authors: Michael Mannino

8th Edition

1948426951, 978-1948426954

More Books

Students also viewed these Databases questions

Question

3. Job rotation is used for all levels and types of employees.

Answered: 1 week ago