DevOps Assignment3
DevOps Assignment3
DevOps Assignment – 2
Branching Concept
1. Create a Student class and write the functions for the following:
1. Display Student Name.
2. Display age of student, by accepting date of birth as parameter(DD-
MM-YYYY or YYYY-MM-DD) using "Date" Class
The above code should be pushed to new GitHub repository for "main"
branch.
------------------------------------------------------------------------------------------
Source code :
import java.util.Scanner;
import java.time.LocalDate;
import java.time.Period;
public class Student_Details {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("Enter candidate name : ");
String student_name = scanner.nextLine();
System.out.print("Enter date of birth (YYYY-MM-DD) : ");
String input_dob = scanner.next();
Student_Details student1 = new Student_Details();
System.out.println("Details of student are : ");
student1.display_student_name(student_name);
student1.display_student_DOB(input_dob);
scanner.close();
}
KLE Tech, Hubli Department of Computer Application
Couse code : 22EBCP205 Course : DevOps Lab
Git commands :
Git commands :