Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I'm trying to find the average of the random number in java. at this moment i'm printing the random number, what i want is to

I'm trying to find the average of the random number in java. at this moment i'm printing the random number, what i want is to sum all of the observations, and divide by the quantity of them. and then print them. and if the random number exceeds 8, print warning. the problem in my output is that it doesn't print the average. and doesn't detect the exceeded number correctly as you can see in the last figure. Thank you.

1)

image text in transcribed

2)

image text in transcribed

3)

image text in transcribed

4)

image text in transcribed

5)

image text in transcribed

30 import java.util.0bservable; 6 public abstract class A implements Observer 7 8 public 8 public abstract String dispO; A10 public abstract void update(Observable subject, 0bject o); 12 13

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

6. Explain the power of labels.

Answered: 1 week ago

Question

5. Give examples of variations in contextual rules.

Answered: 1 week ago

Question

f. What stereotypes were reinforced in the commercials?

Answered: 1 week ago