This is the question I am stuck on - The Huntington High School basketball team has five players named Art, Bob, Cal, Dan, and Eli. Accept the number of points scored by each player in a game and create a bar chart that illustrates the points scored by displaying an asterisk for each point. The output looks similar to the chart in Figure 6-34. The figure looks like this - Enter points earned by Art >> 8 Enter points earned by Bob >> 12 Enter points earned by Cal >> 18 Enter points earned by Dan >> 14 Enter points earned by Eli >> 6 Points for Game Art ******** Bob ************ Cal ****************** Dan ************** Eli ******
This is the question I am stuck on - The Huntington High School basketball team has five players named Art, Bob, Cal, Dan, and Eli. Accept the number of points scored by each player in a game and create a bar chart that illustrates the points scored by displaying an asterisk for each point. The output looks similar to the chart in Figure 6-34. The figure looks like this -
Enter points earned by Art >> 8
Enter points earned by Bob >> 12
Enter points earned by Cal >> 18
Enter points earned by Dan >> 14
Enter points earned by Eli >> 6
Points for Game
Art ********
Bob ************
Cal ******************
Dan **************
Eli ******
I emailed my teacher because I thought I had it right but I didn't I am now fully stuck and unsure what to do. My teacher sent me this - You are making this way too long and complicated. There should only be one for loop in the whole program and it should be in the drawChart method. The main method should call the drawChart method 5 times, once for each player. The method call will pass the name and points to the drawChart method. The drawChart method will print out the name and use a for loop to create the bar chart. The method call will look like this:
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images