From the course: Data Science for Java Developers

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Solution: Displaying data on a bar chart

Solution: Displaying data on a bar chart - Java Tutorial

From the course: Data Science for Java Developers

Solution: Displaying data on a bar chart

(upbeat music) - [Speaker] Okay, so I'm going to show you how I went about solving this challenge. The first thing I did, since we already had a lot of the logic completed for setting up the charts, is I went over to bar graph dot Java and copied and pasted a lot of the code from the start method here into the start method of our challenge class. And the next thing I did is, since the code that we copied and pasted had four-cylinder cars, six-cylinder cars, and eight-cylinder cars, and we have to change that to American cars, European cars, and Asian cars, I changed those in the following way. So I said, list American cars. And then, instead of filtering cars by their number of cylinders, I filtered cars by their origin. Now, it was at this point that I realized that our car record class doesn't yet parse the origin from the data. So the first thing I did was go to the car record data class and add an origin member…

Contents