-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAdmin.java
52 lines (50 loc) · 1.09 KB
/
Admin.java
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
import java.util.*;
class Admin
{String empid,name;
private String password;
int n,qu;
String b[];char k[];String o[][];
Scanner in=new Scanner(System.in);
public Admin()
{
k=new char[qu];
b=new String[qu];
o=new String[qu][4];
}
public void inputdetails()
{ System.out.println("Enter the password");
password=in.nextLine();
System.out.println("Enter the empid");
empid=in.next();
System.out.println("Enter the name");
name=in.next();
}
public void input()
{
Scanner in=new Scanner(System.in);
System.out.println("Number of questions");
n=in.nextInt();
System.out.println("Enter no.of participants");
qu=in.nextInt();
}
public void inputQuestion()
{
System.out.println("Enter the options");
for(int i=0;i<qu;i++)
{ System.out.println("Enter the question and options for"+" "+i);
b[i]=in.nextLine();
for(int j=0;j<4;j++)
{
o[i][j]=in.nextLine();
}
}
}
public void answerkey()
{
System.out.println("Enter answer key ");
for (int i=0;i<qu;i++)
{
k[i]=in.next().charAt(0);
}
}
}