Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

This exercise is very similar to the GradeBook.java example near the end of Chap

ID: 3531021 • Letter: T

Question

This exercise is very similar to the GradeBook.java example near the end of Chapter 6 of your textbook. However, instead of a teacher grade book, we have the following fantasy football scores: Create a FantasyFootball.java class to read in the information in the above table. Structure your program the same as the GradeBook.java, but change the names of the arrays to reflect the new data (i.e. weeks, teams, etc. ). Your code should be very similar to the code in Gradebook.java structure-wise. In order to make the display come out a little nicer, I found it handy to convert the double averages to integer versions by casting to (int). I also found it useful to use tab characters to align the columns. A tab character is the string " ". Don't worry if your output is a little ragged as long as it has the correct data and calculations. Sample Output: Enter number of teams: 4 Enter number of weeks: 3 Enter team name Blind_Pigeons Enter score for team Blind_Pigeons on week number 1 123 Enter score for team Blind_Pigeons on week number 2 95 Enter score for team Blind_Pigeons on week number 3 121 Enter team name Spittn_Lamas Enter score for team Spittn_Lamas on week number 1 54 Enter score for team Spittn_Lamas on week number 2 98 Enter score for team Spittn_Lamas on week number 3 83 Enter team name Nut_Zippers Enter score for team Nut_Zippers on week number 1 70 Enter score for team Nut_Zippers on week number 2 74 Enter score for team Nut_Zippers on week number 3 103 Enter team name Bucking_Broncos Enter score for team Bucking_Broncos on week number 1 108 Enter score for team Bucking_Broncos on week number 2 119 Enter score for team Bucking_Broncos on week number 3 81 ******************************** output from display() ******************************** Blind_Pigeons 123 95 121 Ave = 113 Spittn_Lamas 54 98 83 Ave = 78 Nut_Zippers 70 74 103 Ave = 82 Bucking_Broncos 108 119 81 Ave = 102 Weekly Ave: 88 96 97

Explanation / Answer

import javax.swing.JApplet; import java.awt.Graphics; public class ShapesApplet extends JApplet { public void paint( Graphics g ) { super.paint( g ); g.drawRect( 900, 40, 30, 900 ); g.fillRect( 200, 70, 80, 80 ); g.fillOval( 100, 50, 40, 100 ); g.drawOval( 100, 200, 100, 40 ); int X = 250, Y = 225; int r = 25; g.drawOval( X - r, Y - r, r * 2, r * 2 ); } }

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote