Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package class_work;
- import java.util.Scanner;
- public class Student_info {
- private String login_id;
- private String password;
- public static void main(String[] args)
- {
- String login="XYZ123";
- String pass="123456";
- Scanner Input=new Scanner(System.in);
- String l=Input.nextLine();
- String p=Input.nextLine();
- if((login.equals(l))&&(pass.equals(p))){
- Student_info obj=new Student_info();
- obj.studentd();
- obj.regd();
- obj.coursed();
- }
- else
- {
- System.out.println("NOT FOUND\n");
- }
- }
- public void studentd() {
- System.out.println("Student Details: ");
- System.out.println("\tName: Abdul Aziz\n\tID: 181-15-3000\n\tCGPA: 3.69");
- }
- public void regd() {
- System.out.println("Registration Details:");
- System.out.println("\tSemester: Spring\n\tYear: 2019");
- }
- public void coursed() {
- System.out.println("Course Details:");
- System.out.println("\tCourse code \tSection\n\tCSE214 \t\tD\n\tCSE213 \t\tD\n\tCSE215 \t\tD");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement