Admission System Project: Shad Sarkawt Shawkat
Admission System Project: Shad Sarkawt Shawkat
This course was one of the most essential ones for us; we managed to cover
many topics related to the course and our education, based on up to date
studies and new researches. The course was both factual and practical and
interesting to pursue and study more. As computer engineers, a good
understanding for the subjects is highly critical. It is also worth mentioning, the
topics were very well-chosen through which we understood different aspects of
the subjects discussed in the course and our future career. In my opinion, the
course was well delivered to us very well both at the beginning of the semester
at university and later when they were switched to online classes. Every lesson
was informative in both curricular matter and teaching methods, and especially
when communication with the teacher was easy and questions were answered
very properly. Throughout this course we gained knowledge, skills and
experiences that we can later employ in our future professions and in life in
general life. Thus, I believe these skills prepared us to take the next step
towards studying more on the subject. And I can confidently say this course was
a big accomplishment for us and our future job.
Admission system
University admission or college admission is the mechanism by which students
in universities and colleges enter tertiary education. Systems vary widely across
continents, and even institution by institution There are autonomous
organizations or government departments in some countries that centralize the
administration of standardized admission exams and the handling of requests.
For several nations, aspiring university students apply for admission to high
school or community college during their last year.
What is Java
Java is a collection of computer software and specifications developed by James
Gosling at Sun Microsystems, later purchased by the Oracle Corporation, which
provides a system for the development and deployment of application software
in a cross-platform computing environment. Java is used in a wide variety of
computing systems, from embedded devices and cell phones to enterprise and
superco servers
What is OOP
Object-oriented programming (OOP) is a programming paradigm based on the
concept of "objects," which may contain data in the form
of fields (often referred to as attributes or properties), and code in the form of
procedures (often referred to as method).
A feature of objects is the procedures of an object that can connect
and often edit the data fields of the object they are associated with
My Parts
My part was working with a login method, I created two users and I stored it in
to array list the users is two types Admin and Faculty , with a user id type of a
user, password and username, so the student will easily sign in, if they are a
faculty member they I did faculty methods if they are an admin they can do
admins functionalities and if they are student they can input their details
without any username and password.
int id;
double highschool_grade;
String name;
String email;
User Class
This class contain the user login condition and login validation for the and
contain the constructor to exchange data between the main methods and user
class, the constructor inside this hold user data like (username,password,type)
and validate method to validate the login status if the process success return
true otherwise return false.
public class User {
this.id=id;
this.type=type;
this.password=password;
this.username=username;
return false;
Implementation
Application start point we used while as a loop then we take user input throw Scanner as a
string then we used ( if and else ) to separate regular users form admins at the start of the application
it ask the user if they facility or admin in both case it authenticate the user by using function
login_prompt ()
while(true)
{
System.out.printf("\n*****************\n\nAre you a student or faculty or admin?\n");
String ans = input.nextLine().toLowerCase();
if( ans.equals("faculty") )
{
boolean auth = login_prompt("faculty");
if(auth) faculty_interface();
else System.out.printf("\nWrong username or password.\n");
} if ( ans.equals("admin") )
{
boolean auth = login_prompt("admin");
if(auth) admin_interface();
else System.out.println("Wrong username or password.");
}
else {
System.out.printf("\nPlease enter your student details\n");
submit_form( student_reg() );
}
}//while loop [end point
here in class user we initializing user attribute ( id , type of user [admin , faculty] , username
,pass
Add Admin
This is where admin user crated first initializing and object then we set attributes like username ,
password ,id
users.add(admin);
Add Faculty
This is where faculty user crated first initializing and object then we set attributes like username ,
password ,id
users.add(faculty);
with login_prompt method we separate users this method take one paramatta (type) as a string
then throw scanner, we take user input his credentials then ask for username and password
here separate faculty and admin and return it
System.out.print("Username: ");
String username = input.nextLine();
System.out.print("Password: ");
String password = input.nextLine();
}//boolean login_prompt
Faculty validation
This method provides validation and login for faculty return it as ( True or false )
public static boolean faculty_login(String username, String password)
{
for(int i=0;i<users.size();i++)
{
if( users.get(i).validate(username, password) ) return true;
}
return false;
}//Faculty Login
Admin Validation
This method provides validation and login for Admin return it as (True or false)
By taking two attributes username and password use if to check if it is correct then return it as true if
you enter the correct username and password
Remove User
This method allow us to delete user by getting their ID as an integer value and using user.remove to
delete that user.
View User
By this method we going to display all user data inside the list view like (id,type,username,password)
public static void list_users()
{
System.out.printf("\n\nUsers list:");
for(int i=0;i<users.size();i++)
{
User user = users.get(i);
System.out.printf("\nid: %d | type: %s\nusername: %s\n",user.id,user.type,user.username);
}