Answered step by step
Verified Expert Solution
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
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 andStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started