Inheritance – Can someone help with the Java program below?

You will receive 3 input lines. In the first two lines, you will need to scan the first and second person spaces separated by space in the order: Name, Approval number, Class, Percentage, Outcome of passing, Route number, Blood type, and Father's name.

If you receive an approval number, you must provide that person's name, percentage, route, and name in a single line (separated by spaces). If the registration number does not exist, you receive the error message "No entry found". In the next line, you'll need to print according to the standard the student is currently studying (12 hours), "You're graduating in years."

Apart from the previous classes, you must now create an abstract class absdetail. The father variable is defined in this class. The student class can expand it and override the method of that class, which sets the name of the father. Then, you must create an interface named year that is implemented by the report class to override the required method to return the query for the year of completion.

I wrote the program but did not get the expected result.

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

abstract class absdetail {
public string father;
public void setFather (String fname) {
this.Father = fname;
}
public String getFather () {
return, father;
}
}

Interface year {
final int. graduate = 12;
int getYear (int STD);
}


Class Student extends Absdetail {
public String name = null;
public int ANo;
public int STD;

Public student (string name, int ANo, int STD) {
this.name = name;
this.ANo = ANo;
this.STD = STD;
}


public String getName () {
Return name;
}

public int getANo () {
return ANo;
}

public int STD () {
Return STD;
}
}

Class Report Extends Student Tools Year {

public int days;
public string pass = null;
public Report1 (string name, int ANo, int STD, int ptage, string pass) {
Super (Name, ANo, STD);
this.ptage = ptage;
this.pass = pass;
}
public int getptage () {
Return tension;
}
public String getpass () {
Back pass;
}
// Implement the method here
@Run over
public int getYear (int STD) {
Return graduate-this.STD;
}
}

Class bus extends student {
public route;
public String BG = null;
public Bus1 (string name, int ANo, int STD, int route, string BG) {
Super (Name, ANo, STD);
this.route = route;
this.BG = BG;
}
public String getBG () {
Return BG;
}
public int getroute () {
Way back;
}
}

public class Main {
public static void main (String[] args) throws IOException {
BufferedReader br = new BufferedReader (new InputStreamReader (System.in));
string[] strNums1, strNums2;
strNums1 = br.readLine (). split ("\ s");
strNums2 = br.readLine (). split ("\ s");

Report r1 = new report1 (strNums1[0], Integer.parseInt (strNums1[1]), Integer.parseInt (strNums1[2]), Integer.parseInt (strNums1[3]), strNums1[4]);
Report r2 = new report1 (strNums2[0], Integer.parseInt (strNums2[1]), Integer.parseInt (strNums2[2]), Integer.parseInt (strNums2[5]), strNums2[6]);
Bus b1 = new bus1 (strNums1[0], Integer.parseInt (strNums1[1]), Integer.parseInt (strNums1[2]), Integer.parseInt (strNums1[3]), strNums1[4]);
Bus b2 = new bus1 (strNums2[0], Integer.parseInt (strNums2[1]), Integer.parseInt (strNums2[2]), Integer.parseInt (strNums2[5]), strNums2[6]);
// call setFather for all objects here
int n = integer.parseInt (br.readLine ());
if (n == r1.getANo ()) {
System.out.println (r1.getName () + "" + r1.getptage () + "" + b1.getroute () + "" + b1.getFather ());
System.out.println ("you complete" + r1.getYear (r1.STD) + "years");
}
else if (n == r2.getANo ()) {
System.out.println (r2.getName () + "" + r2.getptage () + "" + b2.getroute () + "" + b2.getFather ());
System.out.println ("you complete" + r2.getYear (r2.STD) + "years");
}
otherwise
System.out.println ("No entry found");
}
}

Input –
A 1 9 99 Yes 27 B + Jaydeep
B 2 10 88 No. 28 A + Kunal
1

Output –
A 99 99 zero
They will be completed in 3 years

The name of the father and the bus route are not printed correctly. Please check and inform.