Write a java program that will ask the user

Assignment Help JAVA Programming
Reference no: EM132109193

Programming problems

1. Write a Java program that will ask the user to enter three integer numbers and find the greatest or the smallest of these numbers.

The program will then ask the user to enter the choice: 1 (for greatest) and 2 (for smallest). Based on the entered choice, the program displays the greatest or the smallest of the three numbers.

Sample output is as follows:

First number: 24

Second number: 10

Third number: 55

Enter 1 (for greatest) and 2 (for smallest): 1

The greatest of these three numbers is 55

2. Write a Java program that will sort first, middle and last names of the user.

The program will ask user to enter the first, middle and the last names. It will also ask sort order e.g. you will enter ‘1' for ascending alphabetical order and ‘2' for descending alphabetical order.

The program should display the three names arranged in the specified sort order and also print "- OK" (if the total length of the names is less than 20 characters, including the space character) or "- Too long" (otherwise) in front of the name.

For example, if the user enters the names as:

First name: Pradeep

Middle name: Kumar

Last name: Atrey Sort order: 1

The program should display the following:

Atrey Kumar Pradeep - OK

Reference no: EM132109193

Questions Cloud

Develop using android studio a rent a car app : HC2051 - design and develop using Android studio a Rent a Car App, that provides a listing of six Australian known car rental companies. By selecting a car
Write a function that outputs everything in the order : Write a function that outputs everything in the order along with the total price. Write a suitable test program that adds multiple pizzas to an order(s).
The infix to postfix conversion : Modify the postfixEval class in the new header file to do double math. Rerun the sample test data and include the output in your report.
Design a program with loop that let the user enter a series : Design a program with loop that let the user enter a series of numbers. Compare each number to the current maximum and minimum.
Write a java program that will ask the user : Write a Java program that will ask the user to enter three integer numbers and find the greatest or the smallest of these numbers.
Create the logic for a program that performs functions : Create the logic for the methods sum() and difference(); they compute the sum of and difference between the values of two arguments, respectively.
Differences in the way the process is performed : ACC203 – Accounting Information Systems - What are the major differences in the way the process is performed - Explain how this case demonstrates
Simulate the experience of a days business at a bank : At program launch, it will query the user for the number of tellers working that day. There must be at least four tellers, and no more than ten tellers.
Write a program for converting us measurement values : Write a program for converting US measurement values to their corresponding metric measurement.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Create a client program that uses all

Create a client program that uses all 3 of the classes created above - Use the get methods to get the attributes for cylinder1 and print them in the client

  Design and create an animated clock

Design and create an animated clock that will be displayed in the Mars Dome - Write the page in validated HTML5

  Explain the problem and then write the pseudo code for it

There are Java compilers and interpreters. Write a 1 page paper on compilers and interpreters (2-3 paragraphs on each topic). Discuss the advantages and disadvantages of compilers and interpreters.

  Expand common text message abbreviations

Output a message for each abbreviation that is expanded, then output the expanded line - Check for abbreviations in the order provided

  Use javascript to write the onmouseenter event handler

Use JavaScript to write the onmouseenter event handler for the mouse enter event of the img tags (similar to the onclick event handler of the img tags in the ImageSwap/SlideShow applications). This handler should change the src attribute of the im..

  Execute the internal loop of the method

The parameter shall determine how many times to execute the internal loop of the method. Within the loop the method

  Create java servlets

Create a new JSON "view" (e.g., a JSP page that only displays the JSON representation of the data)

  Different types of events

There are different types of events. So do you think that all events are equal?

  Better with age

You and your roommates, all at least 21 years of age, have gotten hooked brewing your own beer from kits. You've made quite a few batches, each from a different mix,

  Create two different constructor methods

Create two different constructor methods. Create a simple main program (main() ) that displays several snowmen of different colors.

  Java program- displays all the details of stations

Write a Java program called codes. java that, firstly, prompts (asks) the user to enter an input file name. This is the name of a text file that can contain any number of records.

  Writing a program that evaluates infix expressions

CMSC 350 - writing a program that evaluates infix expressions of unsigned integers using two stacks. The program should consist of three classes

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd