-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathevaluation
More file actions
35 lines (33 loc) · 1.1 KB
/
evaluation
File metadata and controls
35 lines (33 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
public class company{
public static void main(String[] args){
System.out.println("Student with most marks :-\n");
student stu_T1 = new student("Anas Khan",98.9f);
stu_T1.get_t_student();
student stu_T2 = new student("Gursimar",97.9f);
stu_T2.get_t_student();
student stu_t3 = new student("Lovish garg",99.9f);
stu_t3.get_t_student();
System.out.println("\nStudent with least marks :-\n");
student stu_l1 = new student("Ram",38.9f);
stu_l1.get_l_student();
student stu_l2 = new student("Rahul",37.9f);
stu_l2.get_l_student();
student stu_l3 = new student("Rohan",39.9f);
stu_l3.get_l_student();
//
}
}
class student{
String name;
float marks;
student(String name,float marks){
this.name = name;
this.marks = marks;
}
void get_t_student(){
System.out.println("Name of topper is "+name+" and His/Her marks are :"+marks);
}
void get_l_student(){
System.out.println("Name of student with least marks is "+name+" and His/Her marks are :"+marks);
}
}