. Create a java File call Sales.Java contains a Java program that prompts for reads in the sales for each of 5 salespeople in a company. It then prints out the id and amount of sales for each salesperson and the total sale. 2. Compute and print the average sale. 3. Find and print the maximum and minimum sale. 4. After the list, sum, average, max and min have been printed, ask the user to enter a value. Then print the id of each salesperson who exceeded that amount, and the amount of their sales. Also print the total number of salespeople whose sales exceeded the value entered. 5. Instead of always reading in 5 sales amounts, in the beginning ask the user for the number of sales people and then create an array that is just the right size. The program can then proceed as before

Answers

Answer 1

Answer:

The program is as follows:

import java.util.*;

public class Sales{

public static void main(String[] args) {

 Scanner input = new Scanner(System.in);

 int salesPeople;

 System.out.print("Number of Sales People: ");

 salesPeople = input.nextInt();

 int[] salesID = new int[salesPeople];

 float[] salesAmount = new float[salesPeople];

 float total = 0;

 for(int i = 0; i<salesPeople;i++){

     System.out.print("ID: ");      salesID[i] = input.nextInt();

     System.out.print("Amount: ");      salesAmount[i] = input.nextFloat();

     total+=salesAmount[i];  }

 System.out.println("ID\t\tAmount");

 for(int i = 0; i<salesPeople;i++){

     System.out.println(salesID[i]+"\t\t"+salesAmount[i]);  }

 System.out.println("Total Sales: "+total);

 System.out.println("Average Sales: "+total/salesPeople);

 Arrays.sort(salesAmount);

 System.out.println("Minimum Sales: "+salesAmount[0]);

 System.out.println("Maximum Sales: "+salesAmount[salesPeople-1]);

 float sales;

 System.out.print("Print records that exceed: ");      sales = input.nextFloat();

 System.out.println("\nID\t\tAmount");

 int count = 0;

 for(int i = 0; i<salesPeople;i++){

     if(salesAmount[i]>sales){

         System.out.println(salesID[i]+"\t\t"+salesAmount[i]);

         count++;      }  }

 System.out.print("Total sales records that exceed "+sales+" are: "+count);

}

}

Explanation:

See attachment for program source file where comments are used as explanation


Related Questions

Planning to finance higher education helps people prepare for their financial future because it teaches them about

Loans and interest
Savings and accounts
Filing taxes
Short term goals

Answers

Answer:

savings and account

Explanation:

because that will convince them

Answer:

Loans and Interests.

Explanation:

Edge

what type of computer system can be found in the computer lab at school?
A. mini
B. micro
C. Mainframe
D. super​

Answers

Answer:

B: micro

Explanations

a small computer that contains a microprocessor as its central processor.

Can someone help me with Edhesive 8.3 lesson practice question number 5? I can’t figure it out

Answers

Answer:

3

Explanation:

Evaluate:
(3.7 x 10-2) (1.2 x 103)​

Answers

Answer:

[tex](3.7 * 10^{-2}) (1.2 * 10^3) = 44.4[/tex]

Explanation:

Given

[tex](3.7 * 10^{-2}) (1.2 * 10^3)[/tex]

Required

Evaluate

[tex](3.7 * 10^{-2}) (1.2 * 10^3)[/tex]

Remove bracket

[tex](3.7 * 10^{-2}) (1.2 * 10^3) = 3.7 * 10^{-2}*1.2 * 10^3[/tex]

Rewrite as:

[tex](3.7 * 10^{-2}) (1.2 * 10^3) = 3.7 *1.2* 10^{-2} * 10^3[/tex]

[tex](3.7 * 10^{-2}) (1.2 * 10^3) = 4.44* 10^{-2} * 10^3[/tex]

Apply law of indices

[tex](3.7 * 10^{-2}) (1.2 * 10^3) = 4.44* 10^{-2+3}[/tex]

[tex](3.7 * 10^{-2}) (1.2 * 10^3) = 4.44* 10^1[/tex]

[tex](3.7 * 10^{-2}) (1.2 * 10^3) = 4.44* 10[/tex]

[tex](3.7 * 10^{-2}) (1.2 * 10^3) = 44.4[/tex]

What is the organizational management practices on planning during a pandemic like corona virus.

Answers

Answer:

wear a mask use hand sanitizer dont get in contact with anyone between 6 feet

Explanation:

In order to preview an attachment in an e-mail, click the attachment in the ______
Pane.

Help ASAP!!!!

Answers

Answer:

preview

Explanation:

plz mark it as brainliest answer as it will also give you 3 pts

Answer: I love you, I hope you figured it out. Thank your for being alive.

Explanation:

¿Por qué es importante usar adecuadamente el celular?

Answers

Answer:

to stop it from breaking

Explanation:

what is a fixed expense
everfi

Answers

Answer:

A fixed expense is an expense that has a constant total expense value (the total amount of the fixed expense) that remains the same (does not change) when there is a change in the number being managed, manufactured, or sold

Examples of fixed  expense includes; depreciation of assets, salaries of workers, payment for rental lease, and some utility payment, such as road users toll fees payment at a toll gate

Explanation:

Jax earned 144 points on a research project. In this situation, what is the number 144? Group of answer choices data information knowledge output

Answers

Answer: data

Explanation:

Data refers to symbols or numbers that aren't meaningful. It's an an individual unit which consists of raw materials. Data hato be interpreted in order to become meaningful. They are fact or figures. Examples of data include 24, London, 144 etc.

Information on the other hand is a data that has been processed. e.g. Bob has an aggregate score of 144. Based on the question given, the number 144 is a data as it isn't meaningful yet.

Answer:

The answer is A

Explanation:

"as data"

Define the followimg terms as it relates to coding.

Expression

Variable

Assignment operator​

Answers

Answer and Explanation:

In coding, an expression is used to represent values. It may contain variables and/or constant.

Examples of expressions are:

[tex]a - b[/tex]     [tex]a * 2[/tex]     [tex]4 - 3[/tex]

Variables are literally memory locations. They are used to storing values, and they assume the values they store during program execution.

At any point in the program, the value of the variable can be changed.

Lastly, there are guidelines that follow naming variables (depending on the programming language).

Examples of accepted variable names (in C++) are:

num, num_1, num1

Assignment operator

This is the = sign. It is used for assigning values to variables.

Examples of how it is used are:

[tex]num1 = a - b[/tex]

[tex]num\_1 = a*2[/tex]

[tex]num = 4 - 3[/tex]

The following is a wrong usage of the operator

[tex]4 - 3 = num[/tex]

Which function below will allow you to change to a different screen?

changeScreen( )

changePage( )

setPage( )

setScreen( )

Answers

Answer:

Option D

Explanation:

The Set Screen command is used to change the screen to any screen you wish. Screen is notified by its ID

The set screen command is used for some user -event and in such cases set screen is added by click event handler.  

The ID to which the screen is to be changed is selected.

Hence, option D is correct

Anyone help me on this ?

Answers

Answer:

The first one is Mobile Marketing Second Box is social media and the last is Search engine

Explanation:

Investigar cuáles son los Sistemas Operativos más utilizados en la actualidad. ¿cuáles son las características principales de cada uno? Ventajas y Desventajas.

Answers

Answer:

Un sistema operativo es un programa de computadora o colección de programas de computadora que tiene como objetivo facilitar el uso de una computadora, proporcionando el enlace entre el hardware de la computadora y los programas de aplicación que el usuario desea ejecutar en la computadora. El sistema operativo es responsable de la gestión del hardware central, la coordinación de las actividades informáticas y la distribución de recursos en la computadora. Puede verse como lo "básico" de la computadora: un conjunto estandarizado de reglas que determina cómo los programas y los usuarios pueden usar las diferentes partes de la computadora.

Los sistemas operativos modernos comunes incluyen Microsoft Windows, Mac OS, Linux, BSD y Solaris. Microsoft Windows tiene una fuerte participación de mercado dominante para computadoras de escritorio y portátiles. Sin embargo, las computadoras que se usan como servidores ejecutan con mayor frecuencia Linux u otros sistemas similares a Unix.

Write 4 types of viruses , explain them briefly.

Answers

I can help with two.

Web Scripting Virus, A sneaky virus that targets popular websites. What this virus does is overwrite code on a website and insert links that can install malicious software on your device. Web scripting viruses can steal your cookies and use the information to post on your behalf on the infected website.

FILE INFECTOR, targeting executable files (.exe), file infector viruses slow down programs and damage system files when a user runs them.

Which form(s) of credit would be most appropriate for the receipt of a utility bill? (Select all that apply.) à. Charge card b. Revolving credit (credit card) C. Installment credit d. Service credit e. Line of credit​

Answers

Answer:

d. Service credit

Explanation:

Please help!! I dont need the answer i just need explaining on how to do this!!!!

Answers

Explanation:

There are only two inputs to the circuit, and one output. There is an internal signal, not an input, between the inverter and the AND gate.

Here, it is convenient to label the top input A, the inverter output B, and the bottom input C. Of course, the output is labeled D.

Then B is the logical inverse of A, and D is the AND of B and C.

_____

Check for you

D will only be 1 for A=0 and C=1. It will be 0 otherwise.

what is the most improved Android robot​

Answers

Answer:

They are the humanoid robots.

A programmer notices the following two procedures in a library. The procedures do similar, but not identical,
things.

Procedure square (n) returns the value n2

Procedure cube (n) returns the value n3

Which of the following procedures is a generalization of the procedures described above?
A. Procedure Add (n, m), which returns the value n + m
B. Procedure Fourth (n), which returns the value n4
C. Procedure Polynomial(n), which returns the value n3 +n2
D. Procedure Power (n, m), which returns the value nm

Answers

Answer:

D. Procedure Power (n, m), which returns the value n^m

Explanation:

Given

[tex]square(n) \to n^2[/tex]

[tex]cube(n) \to n^3[/tex]

Required

The generalization

The given functions are power functions which returns the power of n to a certain value.

The power sequence follows:

[tex]fourth(n) \to n^4[/tex]

[tex]fifth(n) \to n^5[/tex]

[tex]sixth(n) \to n^6[/tex]

------

-----

--

[tex]power(n,m) \to n^m[/tex]

Hence, (d) is correct

In terms of technology, wich of the four devices is the most recent?

a. keyboard
b. joystick
c. scanner
d. camera​

Answers

Joystick (1972)

They consider the typewriter a keyboard…late 1800’s
Scanner (1957)
Camera (late 1800)

what is it important to test cabless?​

Answers

Answer:

to avoid larger problems ovr time like having to replace a whole line after it has been installed in case it happens that there may be faults you may know whether it was caused by a manufacturer error or installation error

Drag each tile to the correct box.
Match the visual elements of design to the effect they produce.

Answers

Answer:

Creates order and harmony → color

Creates an emotional impact → texture

Brings a feeling of depth to a design → form

Draws or minimizes attention → space

Divides space and redirects the eye → shape

Explanation:

The visual element that creates order and harmony is color

Color can be used to create visible patterns that can be recognized as being in harmony or disagreement

The visual element that creates emotional impact is texture

Texture can be used to convey either the emotions of the object or the artist

The visual element that brings a feeling of depth to a design is form

Form is used to present a 3-D appearance of an art, and therefore, it is used to show depth of a 2-D drawing

The visual element that draws or minimizes attention is space

The arrangement, location, and size of the space occupied by an object can be used to draw or minimize attention

The visual element that divides space and redirects the eye is shape

Shape is used to divide space into areas easily recognizable by the eye

The one who will defeat me in this typing race I will mark the one brainliest:
Just say yes I will send you the link and search for that link in your browser

Answers

Answer:

yes

Explanation:

can you send the link....

Answer:

givee??

Explanation:

As a basic user of SAP Business One, which feature of the application do you like most? Elaborate on your answer.

Answers

Answer:

Accounting and financial management

Explanation:

The feature of SAP Business One I like most is "Accounting and financial management"

This is because as a new user I always find it helpful as SAP Business One, assists me in perfecting and automating the financial administration of my small business by using the business software algorithms that easily incorporate and combine accounting, sales, and purchasing data.

Generally, the Accounting and financial management features assist me in enhancing margins, decrease or totally remove errors, and helps in the process of taking efficient short-term and long-term decisions.

A collection of wiress connecting the CPU with main memory that is used to identify particular location is called

Answers

Answer:

Address buses are made up of a collection of wires connecting the CPU with main memory that is used to identify particular locations (addresses) in main memory. The width of the address bus (that is, the number of wires) determines how many unique memory locations can be addressed.

Explanation:

Address buses are made up of a collection of wires connecting the CPU with main memory that is used to identify particular locations (addresses) in main memory.

What is CPU?

The electronic equipment that carries out the instructions included in a computer program is known as a central processing unit (CPU), sometimes known as a central processor, main processor, or simply processor.

The CPU executes fundamental mathematical, logical, controlling, and input/output (I/O) activities as directed by the program's instructions. In contrast, specialized processors like graphics processing units and external components like main memory and I/O circuitry (GPUs).

Although CPUs' shape, design, and implementation have evolved throughout time, their basic function has remained mostly same. The arithmetic-logic unit (ALU), which performs arithmetic and logic operations, processor registers.

Therefore, Address buses are made up of a collection of wires connecting the CPU with main memory that is used to identify particular locations (addresses) in main memory.

To learn more about CPU, refer to the link:

https://brainly.com/question/16254036

#SPJ5

5. Lael is always on the lookout for students who might be interested in running for office in student groups. In cell M2, enter a formula using a nested IF function as follows to determine first if a student has already been elected to office in a student group, and if not, whether that student meets the qualifications to run in the future: a. If the value in the Elected column is equal to the text "Yes", the formula should display Elected as the text. b. Otherwise, the formula should determine if the value in the Finance Certified column is equal to the text "Yes" and return the text Yes if true And No if false

Answers

Solution :

It is given that Lael always looks out for the students who are interested in running for the office in a student group.

We use an excel sheet to determine whether a student had already elected to the office of the student group or not.

The formula used for the excel sheet used is :

[tex]$=IF(EXACT(K3,"Yes")."ELECTED", "Yes",IF(K3,'Yes),"Yes","No"))$[/tex]

                K                        L                             M                    N          

   Elected group    Finance certificate            

          Yes                    Yes                              Yes

          No                     Yes                               Yes

          No                      No                                No

How do you constrain a background to only appear behind an elements content?

○ background-clip: content

○ background-clip: content-box

○ background-origin: content

○ background-origin: content-box​

Answers

Answer:

Background-origin: Content-box

Explanation:

On CSS, the background-clip command specifies to what extent the background color or image appears in relation to the padding or content of an element

When the setting is background-clip: content-box, where the background is applied in only behind the content of the element, such that the element's border and the element's padding do not have a background color. However, the background extends to the margin of the content.

Find the check digit for the ISBN ‎978147180930

Answers

Answer:

The check digit is 9

Explanation:

An ISBN (International Standard Book Number) is a 10- or 13-digit number used to uniquely identify a book.

The ISBN contains a very important digit called the check digit.

The check digit of an ISBN is very important as it helps in preventing errors in transmission.

When an ISBN is entered into an ISBN reader, the check digit of the ISBN is compared with the check digit calculated from the other digits of the ISBN. If these two digits match, then there is very high chance that the ISBN is correctly entered.

For example, if an ISBN, say, 9781681972718 is entered into the reader,

i. the inputted check digit is the last digit which is 8

ii. the calculated check digit by the reader will also come up with 8.

iii. since the two values match, then the ISBN has actually been entered correctly.

If however, the entered ISBN number was 9781861972718, then,

i. the inputted check digit is the last digit which is 8

ii. the calculated check digit by the reader will also come up with 2.

iii. since the two values do not match, then the ISBN has actually been entered incorrectly.

To calculate the check digit of an ISBN, the steps are;

i. The first 12 digits of the number are taken.

In our case,

the digits are: 978147180930

ii. Multiply the first digit by 1, the second by 3, the third by 1, the fourth by 3 ... in that format until the twelfth digit which will obviously be multiplied by 3.

9 x 1 = 9

7 x 3 = 21

8 x 1 = 8

1 x 3 = 3

4 x 1 = 4

7 x 3 = 21

1 x 1 = 1

8 x 3 = 24

0 x 1 = 0

9 x 3 = 27

3 x 1 = 3

0 x 3 = 0

iii. Find the sum of the answers in (ii) above

9+21+8+3+4+21+1+24+0+27+3+0 = 121

iv. Find the modulo 10 division of the result in (iii). This is just the remainder when the result is divided by 10.

121 mod 10 = 12 remainder 1

v. If the remainder as calculated in (iv) is zero, then the check digit is 0. If otherwise, subtract the remainder from 10 and the result will be the check digit.

The remainder is 1 which is not zero. Therefore, the check digit is

10 - 1 = 9

The check digit is 9 and

the complete ISBN number will be 9781471809309

Which is an example of a table style option?

O banded columns
O shading
O borders
O pen color

Taking the unit test please help ASAP

Answers

Answer:

a. banded columns

Explanation:

A table style is a collection of attributes that are used to format tables. With table styles, formatting such as borders, row strokes and column strokes can be applied to the table.

There are six options in the table style option in Microsoft word. They are;

i. Banded rows: shows banded rows in which odd rows are formatted differently from even rows.

ii. Banded columns: shows banded columns in which odd columns are formatted differently from even columns.

iii. First column: shows special formatting for the first column of the table.

iv. Last column: shows special formatting for the last column of the table.

v. Header row: shows special formatting for the first row of the table.

vi. Total row: shows special formatting for the last row of the table.

To show these options;

i. First insert a table in the document

ii. Click anywhere on the table and a 'Table tools' option will appear at the top of the menu bar.

iii. Click on the 'design tab' of the 'Table tools' and the table style option ribbon will appear at the top left of the page. A figure showing this has been attached to this response.

Write a program that takes as input: - the current hour - the number of hours to add and outputs the new hour. For example, if the inputs are 2 (as the current hour) and 51 (as the number of hours to add), your program should output the answer from part (a) of this problem. Note that your program should always output an integer between 1 and 12. We will get you started with this program with the two lines that gather the input from the user. You'll need to write the rest.

Answers

Answer:

The program in Python is as follows:

cTime = int(input("Current Hour: "))

while(cTime <1 ):

   cTime = int(input("Current Hour: "))

aTime = int(input("Additional Hours: "))

while(aTime <0):

   aTime = int(input("Current Hour: "))

tTime = cTime + aTime

tTime%=12

print("New:",tTime,"hours")

Explanation:

This gets input for current time

cTime = int(input("Current Hour: "))

The following ensures that the user enters a time greater than 0

while(cTime <1 ):

   cTime = int(input("Current Hour: "))

This gets input for additional time

aTime = int(input("Additional Hours: "))

The following ensures that the user enters a positive time

while(aTime <0):

   aTime = int(input("Current Hour: "))

This calculate the new hours

tTime = cTime + aTime

This gets the hour equivalent between 1 and 12

tTime%=12

This prints the new hour

print("New:",tTime,"hours")

Recently mobile phones have been used to pay for goods in stores and supermarkets.

One methodof payment involves holding the phone close to a reader in the store.Discuss the advantages and disadvantages of this method of payment compared with other methods of credit/debit card transactions.

Answers

Answer:

The advantages of using mobile phones to pay for goods in stores are;

1) The ability to pay for goods and/or services without having to carry a physical wallet, thereby making payments faster, more convenient, and safer as the contents of a money wallet or purse cannot be seen

2) The generation of security codes for each transactions, the use of PIN input and finger sprint scanning for payment, ensures access to payment authorization is limited and requires definitive authentication and that payment transactions will not need to be scrutinized by merchants to detect fraudulent transactions

3) Paying with the mobile phone increases privacy as the card used for payment will be known only to the person doing the payment, thereby a person can use a credit card with low limit without displaying them

The disadvantages of using mobile phones to pay for goods in stores includes;

1) The possibility of breach in security of the mobile phone during payment. Sensitive information of the mobile phone can be collected during payment and then used in other places without the permission of the owner of the phone

2) Mobile phone payment may not be suitable to people who prefer card or cash payment

3) The different mobile phone payment applications and platforms are not entirely compatible and can lead to payment challenges

Explanation:

Other Questions
The graph of the function f(x)= x-3 is translated. The new function rule is f(x)= x-1.Which statement is true?a. Every point on the graph is shifted down 1 unit.b. Every point on the graph is shifted left 1 unit.c. Every point on the graph is shifted right 2 units.d. Every point on the graph is shifted up 2 units. PLEASE HELP FAST, THANKS Subtract one half of a number from 10 5. About how many Americans died as a result of the Civil War? Find the value of x (No explanation please :) A car that is normally $4200 is on sale for 80% of its original cost. what is the sale price of the car? What is the volume of this rectangular prism?5 cm3 cm4 cmA. 12 cm3B. 94 cm3C. 120 cm3D. 60 cm3 Please helpppppp 7th grade math What document was created after WW2 to address the issues of genocide and human rights violations? PLZ HELP ASAPThe white triangle drawn on the road sign in the picture has a height of 8 and a base of 5 which formula would be correct to find the area of this triangle1) A= 1/2 (8) (5)2) A=2(8)+2(5)3) A=1/2(8+8)(5+5)4) A=2(8)(8)+2(5)(5) You may not operate a vehicle unless all child passengers __________ are either wearing a safety belt assembly or are securely fastened into an approved child restraint device Which of the following best describes using a slope of -5/10 on a graph?O Move up 5 and right 10.O Move left 5 and up 10.O Move down 5 and right 10.O Move down 5 and left 10. Morrison Company manufactures two products: digital cameras and video cameras. The company uses an activity-based costing system. The annual production and sales volume of digital cameras is 10,000 units and of video cameras is 8,000 units. Direct costs for the digital cameras are $122; for the video cameras, direct costs are $153.For overhead costs, there are three activity cost pools with the following expected activities and estimated total costs:Activity Cost Pool Estimated Cost Expected Activity Digital Cameras Expected Activity Video Cameras TotalActivity 1$30,000 100 500 600Activity 2 $45,000 600 300 900Activity 3 $96,600 400 2,000 2,400Refer to Morrison Company. Using ABC, the total cost per digital camera is approximately:Please show calculations! Find the measure of the largest angle. Ayuda es urgente porfavor Write and graph an inequality to represent each situation.The stock is worth at least $3.5 Find the simple interest earned, to the nearest cent, for the principal, interest rate, and time.$650, 5%, 1 yearHelp Which relation is a function? Which act effectively ended the Congressional policy of neutrality? BRAINLIEST IF CORRECT