public class Student { private String name; private String id; private double cgpa; public void setName(String name){ this.name=name; } public String getName(){ return name; } public void setId(String id){ this.id=id; } public String getId(){ return id; } public void setCgpa(double cgpa){ this.cgpa=cgpa; } public double getCgpa(){ return cgpa; } public void display(){ System.out.println("Name:"+getName()); System.out.println("Id:"+getId()); System.out.println("CGPA:"+getCgpa()); } } public class Main { public static void main(String[] args) { Student stu=new Student(); stu.setName("Esraq"); stu.setId("74-25888-87"); stu.setCgpa(3.56); stu.display(); } }