Question
Using JAVA: Create a program that -Uses a for loop - Do not use Array Lists -Use encapsulation -Use a try catch block -Ask for
Using JAVA:
Create a program that
-Uses a for loop
-Do not use Array Lists
-Use encapsulation
-Use a try catch block
-Ask for input from user
Create 3 classes, app, football player and football team.
Create 11 football players using an Array,
create a football team using the players above
use the football team instance (object) to display the information requested in the lab
football player class has at least 2 attributes
a method that returns the complete info about the player
football team class has a name and team color
a method that: displays all the information about a team including: name team color, and information on each player in the team and assigns a random score to each team.
a method that: displays information about a specific player in the team using an input parameter such as the player's favorite color or player number.
a method that displays the top four highest scoring teams in order of highest score.
a method that writes the top four highest scoring teams, in order of highest score to a text file.
Step 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