Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

java for this question ke Write a public class named Person with two private instance variables named age of * type int and opinionStrength of

image text in transcribed java for this question

ke Write a public class named Person with two private instance variables named age of * type int and opinionStrength of type double. You may add any other variables, methods, or *constructors to this class. Then in the Problem Set class write a public method named Histogram that takes an Arraylist of people and a String as parameters and returns demographic determined by the input String using the chart below adult: 20-63 * a HashMap of String to Integer. The returned HashMap will represent a histogram for an age * teen: 16-19 *senior: 68+ For example, if the input String is "teen" then the method only considers people from age * 16 through 19 in the histogram. Then categorize their opinion strengths in the HashMap *according to this chart low:50.0 medium:50.0 and140.0 *strong: 140.0 and

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

develop your skills of project planning.

Answered: 1 week ago

Question

Write a note on job design.

Answered: 1 week ago

Question

Compute the derivative of f(x)cos(-4/5x)

Answered: 1 week ago

Question

Discuss the process involved in selection.

Answered: 1 week ago

Question

Differentiate tan(7x+9x-2.5)

Answered: 1 week ago

Question

4. What actions should Bouleau & Huntley take now?

Answered: 1 week ago