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
-
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...
-
?
-
To immobilize a fractured femur (the thigh bone), doctors often utilize the Russell traction system illustrated in FIGURE 6-51. Notice that one force is applied directly to the knee, F(vector) 1 ,...
-
Once a security is issued, it can be sold repeatedly. Such sales may be accomplished on a physical exchange, such as the New York Stock Exchange (NYSE), where agents of buyers and sellers deal...
-
What would happen to the SML graph in Figure 8.8 if expected inflation increased or decreased? Figure 8.8 268 269 270 271 272 273 274 275 A Required Rate of Return TH-13.0% SML: r, RF+RPM * b D E F H...
-
Nick and Jolene are married. Nick is 61 and retired in 2010 from his job with Amalgamated Company. Jolene is 56 and works part-time as a special education teacher. Nick and Jolene have a substantial...
-
Date Account Title Debit Credit Sept 1 Cash 10,000 Common Stock 10,000 Sept 2 Equipment 5,000 Cash 5,000 Sept 3 Rent Expense 400 Cash 400 Sept 4 Supplies 500 Cash 500 Sept 5 Advertising Expense 250...
-
Laredo Leather Company manufactures high-quality leather goods. The companys profits have declined during the past nine months. In an attempt to isolate the causes of poor profit performance,...
-
Elliot is the one-year-old son of Andrew and Diana Wilson. Elliot starred in several television commercials this year for which he was paid $30,000 as compensation. His parents received the...
-
Sales revenue for Marshall Mattresses was $240,000. The following data are from the accounting records of Marshall: Bad debt expense $2,000 Accounts receivable decrease 5,000 Allowance for...
-
if my initial investment is 2550000.00 and the discount rate is 7%, what is the net present value of year zero
-
7) How long should cancelled checks, accounts payable and accounts receivable ledgers be retained by a taxpayer?
-
Zone C3: Refer to the 1.000 basic dimension. What is the tolerance? D B NOTICE OF PROPRIETARY RIGHTS This document centains contdential technical data, including trade secrets and proptelowy...
-
Find the limits 1. lim x2x-3 3x-5x +7 x+0 8+2x-5x ++3 3. lim 5. lim X x400x+2 818 7. lim : x-001-x 3x + 2x 9. lim 2x-1 x-00 3x+x+1 2. lim x im x2 - 4 818 x-2 x41x1x 4. lim x + sin x 818 x-00x+ cos x...
-
convert the coordinates of the point (2, /2, ) to cylindrical
-
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");
-
A slot machine is a gambling device that the user inserts money into and then pulls a lever (or presses a button). The slot machine then displays a set of random images. If two or more of the images...
-
Design a number guessing game program. The program should generate a random number and then ask the user to guess the number. Each time the user enters his or her guess, the program should indicate...
-
As an illustration of the difficulty in identifying monopolies, try to decide which of the following are monopolies: a train operating company; your local evening newspaper; the village hairdresser;...
Study smarter with the SolutionInn App