Pergunta de entrevista da empresa Accenture

How do I write a Java program to find the student who got the highest total from a list there the user must enter their name, roll number, and the marks of 5 subjects? Also write a SQL code for the same.