-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathassignemntOne.java
More file actions
57 lines (40 loc) · 1.08 KB
/
assignemntOne.java
File metadata and controls
57 lines (40 loc) · 1.08 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import java.util.Scanner;
/*class Student{
int usn;
char sem;
int marks[] = new int[8];
<TO DO:Add Constructor to initialize sem and usn>
<TO DO : Add constructor with no intializations>
public void setSem() {
Scanner sc = new Scanner(System.in);
this.sem=sc.next().charAt(0);
}
public void setUsn(int usn) {
Scanner sc = new Scanner(System.in);
this.usn=sc.nextInt();
}
<TO DO : ADD METHOD TO SET MARKS>
public int[] getMarks() {
return marks;
}
public char getSem() {
return sem;
}
public int getUsn() {
return usn;
}
<TO DO: Add a method to find maximum marks>
}
public class assignemntOne {
public static void main(String[] args) {
Student eeeStudent1 = new Student();
int usn;
int sem;
Student eeeStudent2 = new Student(usn,sem);
<TO DO: Assign marks to students>
<TO DO: Print the max marks of both students>
<TO DO: Take input of a subject index from user and print
which student has more marks in that subject>
}
}
*/