Write a class called AnalyzeNumbers which asks the user to enter the number of inputs and...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a class called AnalyzeNumbers which asks the user to enter the number of inputs and stores them in an Array, then prints the Array that was inputted, calculates the sum of the numbers entered and prints the total numbers greater than the first inputted number: Sample Run: Enter the number of items: 5 Enter the numbers: 3.4 5 6 7.19 You inputted: 3.4 5.0 6.0 7.1 9.0 Sum is: 30.5 Number of elements greater than the first element: 4 Enter the number of items: 3 Enter the numbers: 6.7 1.5 3.2 You inputted: 6.7 1.5 3.2 Sum is: 11.4 Number of elements greater than the first element: 0 Write a class called AnalyzeNumbers which asks the user to enter the number of inputs and stores them in an Array, then prints the Array that was inputted, calculates the sum of the numbers entered and prints the total numbers greater than the first inputted number: Sample Run: Enter the number of items: 5 Enter the numbers: 3.4 5 6 7.19 You inputted: 3.4 5.0 6.0 7.1 9.0 Sum is: 30.5 Number of elements greater than the first element: 4 Enter the number of items: 3 Enter the numbers: 6.7 1.5 3.2 You inputted: 6.7 1.5 3.2 Sum is: 11.4 Number of elements greater than the first element: 0
Expert Answer:
Answer rating: 100% (QA)
Certainly Heres a Java class called AnalyzeNumbers that fulfills the requirements java import javaut... View the full answer
Related Book For
Java How To Program Late Objects Version
ISBN: 9780136123712
8th Edition
Authors: Paul Deitel, Deitel & Associates
Posted Date:
Students also viewed these programming questions
-
4. Let b be a positive number A 2b m ladder is leaning against the wall of a church, a cat is attached to the bottom of the ladder. He sees a mouse (or a field mouse...I can't tell them apart) and...
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
You are required to write a Python program that will manage character (heroes and villain) information. Character (hero and villain) information will be stored in a text file that will be read in...
-
?
-
When n is a positive integer, set (a) Find the solution un(x) to the boundary value problem -u" = fn(x), u(0) = u(l) = 0, assuming 0 (b) Prove that converges to the Green's function (11.59). Why...
-
Please use the website below to find an APPLE bond http://finra-markets.morningstar.com/BondCenter/Default.jsp In your initial response you should answer the main question: If you are an investor who...
-
Spring Colours Inc. is planning to invest \($230,000\) in a new garden product that is expected to generate additional sales of 12,500 units at \($16\) each. The \($230,000\) investment includes...
-
J. Tilkenhurst Limited (JTL) is a Canadian-controlled private corporation which was started in 1988 by Mr. Santosh Prasad with an initial investment in common shares of $18,000. Mr. Prasad has...
-
Problem 2. (25 marks) The W&S Company manufactures commercial zippers() of two kinds: kind X and kind Y. Its production department estimates that the average-cost function of the firm is...
-
Zek Ltd assembles heavy industrial switchboxes. Hitherto, Zek Ltd has assembled only one type, but recently a decision was made to expand the product range into two types. The following data pertains...
-
The following information is related to Bramble Company for 2025. Retained earnings balance, January 1, 2025 $1,136,800 Sales revenue 29,000,000 Cost of goods sold 18,560,000 Interest revenue 81,200...
-
Zerox Copying Company plans to borrow $225,000. New Jersey National Bank will lend the money at one-half percentage point over the prime rate at the time of 16.50 percent (17 percent total) and...
-
A transverse wave on a string is modeled with the wave function y(x, t) = (0.60 m)sin[(0.85 m-1)x + (1.70 s)t + 0.20]. (Indicate the direction with the signs of your answers.) (a) Find the wave...
-
Building Resilience detailing and explaining 1. what is resilience , 2.ways to build resilience- 3. build connections, 4. foster wellness, 5. find purpose, 6. embrace healthy thoughts, and 7. how to...
-
1. The net profit before taxes as per the profit and loss account, of Gaman Ltd is Rs 269244. With the given set of information, classify the given items as (operating / investing/financing), share...
-
The Reynolds Corporation buys from its suppliers on terms of 3/18, net 65. Reynolds has not been utilizing the discounts offered and has been taking 65 days to pay its bills. Ms. Duke, Reynolds...
-
Use Atoine equation to calculate the vapor pressure of n-Pentane, using the constants given in Appendix H. Plot py vs. T with MS Excel or MATLAB. (5 points) a) Find the valid temperature range of the...
-
Chloroplasts are illuminated until the levels of the Calvin cycle intermediates reach a steady state. The light is then turned off. How does the level of RuBP vary after this point?
-
Recreate the classic word game Hangman. At the start of the game, display a dashed line with one dash representing each letter in the word to be guessed. As a hint to the user, provide either a...
-
Display a string containing \\\\ (recall that \\ is an escape sequence for a backslash). How many backslashes are displayed?
-
What does the following code print? System.out.printf(" ****%n ******%n*******%n ******%n ****%n");
-
Suppose \(\mathscr{G}\) is the class of linear functions. A linear function evaluated at a feature \(\boldsymbol{x}\) can be described as \(g(\boldsymbol{x})=\boldsymbol{\beta}^{\top}...
-
Suppose that the loss function is the piecewise linear function \[ \operatorname{Loss}(y, \hat{y})=\alpha(\hat{y}-y)_{+}+\beta(y-\hat{y})_{+}, \quad \alpha, \beta>0 \] where \(c_{+}\)is equal to...
-
Show that, for the squared-error loss, the approximation error \(\ell\left(g^{\mathscr{C}} ight)-\ell\left(g^{*} ight)\) in (2.16), \(\begin{array}{llllll}\text { is } \quad \text { equal } & \text {...
Study smarter with the SolutionInn App