You have been tasked to design a COVID-19 screening application for your campus. The guards at each gate will screen the students and enter their details on the application. The capabilities and features of the application should include a choice between the following functions: 1. A screening survey which will allow guards to record the students’ screening data. 2. Searching for a student’s details and status. Technical Requirements: 1. The application should make use of Parallel arrays that will hold the details of the student as it is entered along with their status (admitted/not admitted). No more than 300 students will be allowed on a campus at any given day and time. 2. No student should be allowed access to the campus after 12h00 in the afternoons regardless of whether capacity has been reached or not. 3. If a student’s temperature is 38 degrees or more, they will not be allowed entry into the campus.
import java.util.Scanner;
public class Main
{
private String name;
private int regNo;
private String course;
public String getName() {
return this.name;
}
public int getRegNo() {
return this.regNo;
}
public String getCourse() {
return this.course;
}
public void setName(String n) {
this.name = n;
}
public void setRegNo(int rn) {
this.regNo = rn;
}
public void setCourse(String cs) {
this.course = cs;
}
public static void main(String[] args) {
Main m=new Main();
System.out.println("Student details");
Scanner sc=new Scanner(System.in);
System.out.print("Enter student name: ");
String a= sc.next();
m.setName(a);
System.out.print("Enter registration number: ");
int b= sc.nextInt();
m.setRegNo(b);
System.out.print("Enter course name: ");
String c= sc.next();
m.setCourse(c);
}
}
Comments
Leave a comment