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
-
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...
-
At April 30, the bank reconciliation of Back 40 Company shows three outstanding checks: No. 254 $650, No. 255 $700, and No. 257 $410. The May bank statement and the May cash payments journal are...
-
Find the indefinite integral: e 7x .dx e 7x+36
-
The balance sheet of Banc One Corp. at December 31, 2007, reported 500,000 shares of \(\$ 1\) par common stock authorized with 100,000 shares issued. Paid-In Capital in Excess of Par had a balance of...
-
Youre a supervisor in the treasury department of Big Corp. Recently there has been increasing concern about the firms rising interest expense. Fred Eyeshade is an analyst in your group who...
-
(1) Exactly what is vanity sizing and how is it effectively used by fashion retailers? (2) Why are top fashion firms reluctant to use REAL SIZING? (3) What are your thoughts on model Ashley Graham?...
-
On May 31, O'Hearne Limited had a cash balance per books of $13,126. The bank statement from Community Bank on that date showed a balance of $15,230. A comparison of the bank statement with the...
-
1. Juno Mining Company plans a $200 million debt issue. The debt's YTM is 10%, and Juno has a 40% tax rate. What is its after-tax cost of debt? 2. Butternut Company sells for $10 per share. Its...
-
Mary stands 200 meters from a water tower. She holds up a ruler 0.5 meters in front of her and measures the tower to be 0.05 meters tall. How tall is the water tower? Joe holds a two-meter stick...
-
Discuss the three main challenges you will need to consider and explain how they should be applied in design thinking and considering a viable International Business Idea.
-
Current Designs is always working to identify ways to increase efficiency while becoming more environmentally conscious. During recent brainstorming session, one employee suggested to Diane Buswell,...
-
1. Volcanic Eruption A 4,200 m tall volcano is erupting, and hot lava is spewing up into the air! Unfortunately, there is a city of people 1,600 m from the near edge of the volcano, as shown in the...
-
I have 5 kg of ice @ -10 degrees Celsius. How much heat (in Joules) do I need to: A: Bring that to 5 kg of ice @ 0 degrees Celsius B: Change it from 5 kg ice 0 degrees to 5 kg Water @ 0 degrees. C....
-
Problem 2 (10pts). Assume the training data for the classification task is given as follows: (r(),y()), (r(2), y()), (r(M), y(M)), with y() {0,1}, i = 1,2,..., M. The logistic regression is employed...
-
Suppose that a business sells 6-month subscriptions to its monthly magazine. On January 1, the company receives a total of $600 for 10 subscriptions. To record this transaction, the company debits...
-
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...
-
Analytical procedures: a. Are intended to detect material misstatements in financial statement accounts. b. Are concerned with how internal control policies or procedures are applied. c. Are...
-
Substantive tests of details: a. Are intended to detect material misstatements in financial statement accounts. b. Are concerned with how internal control policies or procedures are applied. c. Are...
-
Tests of controls: a. Are intended to detect material misstatements in financial statement accounts. b. Are concerned with how internal control policies or procedures are applied. c. Are evaluations...
Study smarter with the SolutionInn App