1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
MArishka [77]
3 years ago
14

Design and implement a program (name it SumValue) that reads three integers (say X, Y, and Z) and prints out their values on sep

arate lines with proper labels, followed by their average with proper label. Comment your code properly. Format the outputs following the sample runs below.
Sample run 1:
X = 3
Y = 2
Z = 4
Average = 3.0
Sample run 1:
X = 7
Y = 8
Z = 10
Average = 8.333333333333334
Sample run 1:
X = 7
Y = -3
Z = -5
Average = -0.3333333333333333
Chemistry
1 answer:
rjkz [21]3 years ago
3 0

Answer:

class sum (

public static void sumofvalue (int m, int n, int p)

{

System.out.println(m);

System.out.println(n);

System.out.println(p);

int SumValue=m+n+p;

System.out.println("Average="+Sumvalue/3);

}

)

Public class XYZ

(

public static void main(String [] args)

{

sum ob=new sum();

int X=3;

int X=4;

int X=5;

ob.sumofvalue(X,Y,Z);

int X=7;

int X=8;

int X=10;

ob.sumofvalue(X,Y,Z);

}

)

Explanation:

The above program is made in Java, in which first we have printed value in a separate line. After that, the average value of those three values has been printed according to the question.

The processing of the program is given below in detail

* The first one class named 'sum' has been created which contains the function to print individual value and the average of those three values.

* In seconds main class named 'XYZ', the object of that the above class had been created which call the method of the above class to perform functions.

* In the main class values are assigned to variables X, Y, Z.

You might be interested in
HELP ASAP 20 OR MORE POINTS!!!!
pishuonlain [190]
<h2>YeS im Am fRom pLanet k12 And brinG anD imPortant MesSage </h2>

  • The answer to your question is, <u><em>There are only so many ways matter can arrange itself within that infinite universe.</em></u>

<h2><em>Also if your on the same test as me heres some other sTuff that was on my test </em></h2><h2><em> </em></h2>

 Question 1 (1 point)  

In Brian Greene's "A Physicist Explains Why Parallel Universes May Exist", what reason does Greene give for why he believes parallel universes may exist?

  • <em>Answer: There are only so many ways matter can arrange itself within that infinite universe.</em>

<em>   </em>

Question 2 (1 point)  

Choose the best explanation for why we experience the Mandela Effect.

  • <em>Answer: Our brains tend to fill in information that we cannot readily recall and make associations that are not true.</em>

Question 3 (1 point)  

From the article "Time Travel Is A Fun Science Fiction Story But Could It Be Real?", Albert Einstein's Theory of Relativity is described as what?

 

  • <em>Answer:  The pulling force of gravity causes space to curve and causes time to slow down.</em>

Question 4 (1 point)  

From the video " Are Wormholes The Answer To Time Travel?", how are worm holes described?

  • <em>Answer:   A tunnel in space connecting two regions very distant from each other. A "short cut" through space</em>

Question 5 (1 point)  

Many scientists think human cloning is possible, so why haven't we made human clones yet?

  • <em>Answer:  Human cloning is extremely controversial and many people believe it is unethical</em>

<h2><em>HOPE THIS HELPS ANYONE IF IT DOES THANK AND RATE FOR A FREE COOKIE :D </em></h2>
6 0
3 years ago
Read 2 more answers
N__________ is the study of atoms.
AlekseyPX
I think the answer might be nuclear physics
3 0
3 years ago
Read 2 more answers
An atom contains one proton , one electron, and one neutron. Which two particles are most similar in mass
andrey2020 [161]
Proton and neutron, which are both approximately 1 amu
3 0
3 years ago
Read 2 more answers
A hydrate is compound that included water molecules within its crystal structure. During an experiment to determine the percent
stellarik [79]

Answer:

The percent by mass of water in this crystal is:

  • <u>21.4%</u>

Explanation:

This exercise can be easily solved using a simple rule of three where the initial weight of the hydrated crystal (6,235 g) is taken into account as 100% of the mass, and the percentage to which the mass of 4.90 g corresponds (after getting warm). First, the values and unknown variable are established:

  • 6,235 g = 100%
  • 4.90 g = X

And the value of the variable X is found:

  • X = (4.90 g * 100%) / 6,235 g
  • X = approximately 78.6%.

The calculated value is not yet the percentage of the water, since the water after heating the glass has evaporated, therefore, the remaining percentage must be taken, which can be calculated by subtraction:

  • Water percentage = Total percentage - Percentage after heating.
  • <u>Water percentage = 100% - 78.6% = 21.4%</u>
4 0
3 years ago
Read 2 more answers
How adding tin to copper makes the bronze alloy harder?
andrey2020 [161]
It makes the bronze stronger and harder than either of the other two medals
8 0
3 years ago
Read 2 more answers
Other questions:
  • Consider the group 1A elements sodium (period 3), potassium (period 4), and rubidium (period 5). What would you predict about th
    9·1 answer
  • Which element in period 2 has six electrons in its electron dot structure?
    11·1 answer
  • Suppose a large atom bonds with a small atom.  Will the properties of the new molecule be the same as the large atom, the small
    11·1 answer
  • What monomer is polymerized to make acrylate? What is the chemical name for this popular polymer?
    11·2 answers
  • What is the definition of atomic group
    5·1 answer
  • A beaker contains a small amount of baking soda. A few drops of hydrochloric acid are added to the baking soda. Fizzing and bubb
    12·1 answer
  • From a cross between a short-haired guinea pig (hh) and a long-haired guinea pig (Hh), what would be the possible phenotypes of
    11·1 answer
  • Does a physical change form a new substance
    9·1 answer
  • Differences in ocean water density are larger at low latitudes near the equator because the water temperature changes often thro
    6·1 answer
  • When 84. 8 g of iron (III) oxide reacts with an excess of carbon
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!