Problem1: Create a java program that accepts 5 integers and sorts the integer to lowest to...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Problem1: Create a java program that accepts 5 integers and sorts the integer to lowest to highest or vice versa depending on the choice of the user. If sort order choice is not on the list, the program will return "Invalid option. Program terminated.". Name the problem as Surname Problem1.java ******SAMPLE OUTPUT****** Enter integer 1: 3 Enter integer 2:5 Enter integer 3: 25 Enter integer 4: 10 Enter integer 5: 18 1- lowest to highest 2- highest to lowest Sort order: 2 25 10 18 5 3 ******SAMPLE OUTPUT****** Problem 2: Create a java program that accepts 1 string/character and determines if the input is a vowel or consonant. If the input is not a vowel or consonant the program must return "Invalid input. Program terminated.". Name the problem as Surname Problem2.java ******SAMPLE OUTPUT**** Enter an alphabet: m m is consonant ******SAMPLE OUTPUT****** NOTE: YOU CANNOT USE ARRAY Problem1: Create a java program that accepts 5 integers and sorts the integer to lowest to highest or vice versa depending on the choice of the user. If sort order choice is not on the list, the program will return "Invalid option. Program terminated.". Name the problem as Surname Problem1.java ******SAMPLE OUTPUT****** Enter integer 1: 3 Enter integer 2:5 Enter integer 3: 25 Enter integer 4: 10 Enter integer 5: 18 1- lowest to highest 2- highest to lowest Sort order: 2 25 10 18 5 3 ******SAMPLE OUTPUT****** Problem 2: Create a java program that accepts 1 string/character and determines if the input is a vowel or consonant. If the input is not a vowel or consonant the program must return "Invalid input. Program terminated.". Name the problem as Surname Problem2.java ******SAMPLE OUTPUT**** Enter an alphabet: m m is consonant ******SAMPLE OUTPUT****** NOTE: YOU CANNOT USE ARRAY
Expert Answer:
Answer rating: 100% (QA)
Here are Java programs for both problems Remember to replace Surname with your actual surname Problem 1 SurnameProblem1 import javautilScanner public ... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
The weights of ice cream cartons are normally distributed with a mean weight of 7 ounces and a standard deviation of 0.5 ounce. (a) What is the probability that a randomly selected carton has a...
-
Predictive text entry systems are familiar on touch screens and mobile phones. This question asks you to consider how the same principles might be used in a programming editor for creating Java code....
-
Let r and s be solutions to the quadratic equation x 2 b x + c = 0. For n N, define d0 = 0 d1 = r s dn = b dn1 c dn2 (n 2) Prove that dn = r n s n for all n N. [4 marks] (b) Recall that a commutative...
-
An employee received the following benefits: regular compensation income, net of P25,000 SSS, PHIC & HDMF employee share - P850,000; 13th month pay - P120,000; De minimis benefits within their limits...
-
Suppose the prices in each segment under perfect information are as shown in the table below. A reservation price is the lowest price a seller will accept. Also assume that buyers are risk-neutral...
-
Chaz owns investment A and 1 bond B.The total value of his holdings is $4,200.Bond B has a coupon rate of 5.28 percent, par value of $1000, YTM of 6.82 percent, 6 years until maturity, and...
-
May (2001) conducted a study of 508 women in the Houston area to identify the skills and attributes those women believed would be needed to succeed in leadership positions in the 21st century. Data...
-
The Bike and Hike Outlet is a retail store. Transactions involving purchases and cash payments for the firm during June 2016 are listed below as are the general ledger accounts used to record these...
-
Explain the impact of ecommerce on inbound supply chain manegment of sainsburry.
-
5 Bernard L. Madoff, through BLMIS, operated a Ponzi scheme inducing investors to open discretionary trading accounts with BLMIS for the ostensible purpose of buying and selling securities. No...
-
Be sure to include it at the beginning of the post. Look for a published job description Company Name: General Motors Adapted to the job description you found, design 3 possible interview questions...
-
Using the following facts, calculate the NFPs of the spouses and the equalization of their NFPs. Wife's Financial Situation At the date of the marriage: Owned a condominium townhouse then worth...
-
Invert the following matrix over Z15 or prove that it cannot be inverted. 201 3 79 476
-
In the United States, nearly 15 million people have alcohol use disorder, including over 400,000 adolescents. Alcohol contributes to over 18% of emergency department visits in the US and alcohol is...
-
Natural gas composed of 60. mol% methane, 30. mol% ethane, and 10. mol% propane at 25 C and 500. psia is fed at a rate of 50. m 3 /hr into a boiler. In the boiler it is blended with enough air to...
-
Lawrence Thompson, 6 0 years old recently retired and received a $ 2 5 M cash payment from his employer as an early retirement incentive. He also obtained $ 8 , 0 0 0 , 0 0 0 by exercising his...
-
Semester Project: In Chapter 13, you learned the importance of having their product in the right place for consumers to access it. In this exercise, you should determine the appropriate channels to...
-
Time Travel Publishing was recently organized. The company issued common stock to an attorney who provided legal services worth $25,000 to help organize the corporation. Time Travel also issued...
-
Write a program to plot the following face.
-
Consider a program for managing inventory in a small appliance store. Why isnt it useful to have a superclass SmallAppliance and subclasses Toaster, CarVacuum, TravelIron, and so on?
-
Write a method public static int countVowels(String str) that returns a count of all vowels in the string str. Vowels are the letters a, e, i, o, and u, and their uppercase variants. Use a helper...
-
Veering off the mission is one of the key challenges in the boardroom. Why is mission focus so essential to an organization?
-
How do you convince a new member to go through orientation if he has already served on numerous boards and feels he understands what board service is all about?
-
List specific examples of a board not meeting the duties of care, loyalty, and obedience.
Study smarter with the SolutionInn App