Develop an application in Java for automating the Hostel Management
System using packages. Create Hostel class in pkg1, Student class, and
SRA class in pkg2. Perform menu driven operations like SRA Allocation,
List of SRA’s in a Hostel, List of Students under a particular SRA, and
View Student Details from a Test class by importing these two packages.
//pkg1 file
package pkg1;
class Student{
private:
string student_in_srg;
string student_details;
}
// test file
import pkg1.*;
import pkg2.*;
public class Main
{
public static void main(String[] args) {
Student s=new Student();
SRA sr=new SRA();
}
}
//pkg1 file
package pkg2;
class SRA{
private:
string SRA_Allocation;
string SRA_Hostel;
}
Comments
Leave a comment