import java.io.*;
import java.util.Scanner;
public class AFLPlayer extends AFLTeamMember
{
private int number; // number declared for the AFLPlayer
private boolean isCaptain; // isCaptain declared for the AFLPlayer
public AFLPlayer (String name, String position, int number, boolean isCaptain) // AFLPlayer can extend the name and its position for the isCaptain
{
super (name, position); // super keyword used for the setting the name and its position for the AFLPlayer
setNumber (number); // set the number for the AFLPlayer
setCaptain(isCaptain); // isCaptain for extension for the AFLPlayer
}
public int getNumber () // getting the number
{
return number; // returning the number
}
public void setNumber (int number) //setting the number which is type of int for the AFLPlayer
{
try // try
{
if (number>0)
this.number = number;
else
throw new
Exception ("Invaid player number!"); // invalid player number
}
catch (Exception e) // catch the exception
{
System.out.println(e); // print out the exception
}
}
public boolean isCaptain () // isCaptain for the exceptional isCaptain
{
return isCaptain; // returning the isCaptain
}
public void setCaptain (boolean isCaptain); //setCaptain for the exceptional isCaptain
public String toString()
{
if(isCaptain)
return " [" +number+"]"
"+super.toString()+" (c);
return "["+number+"]
"+super.toString(); //returning the number
}
}
}
*******CAN ANYONE FIX THE ERRORS IN IT AMD TYPE THE RIGHT CODE FOR THIS*******
Execute Mode, Version, inputs 8 Arguments: CommandLine Arauments Result CPU Time: sec(s), Memory: kilobyte(s) /AFLP1ayer.java: 42; error; not a statement "+super, tostring ( ) + " (c)"; /AFLP1ayer,javas 42, error; "', expected "tsuper, toString ()+n(c)"; /AFLPlayer, java:42: error: not a statenent "+super, toString()+" (c)"; /AFLPlayer. javai42; error: ';' expected "+super, tostring()+" (c)"; /AFLP1ayer.java:421 errort unclosed string literal "+super, tostring()+" (c)