logo

Design and Development of Bright College Management System using Java

   

Added on  2023-05-30

20 Pages3723 Words151 Views
1 Design and Development
To develop the Bright College Management system, Java programming language is used. Java is an
object-Oriented language and is the most appropriate language to use to develop the proposed system.
By using different Object Oriented design patterns, the proposed application will be able to take
advantage of most important object oriented design patterns like encapsulation and method overriding.
To demonstrate the design of the proposed system, a domain class diagram can be used to show the
classes and objects that will make up the system.
Design and Development of Bright College Management System using Java_1
Figure 1: Class diagram
Figure 1 shows the class diagram for the proposed system. The system will be made up of three classes;
Course, Student and Bright class. The Student and Course classes are domain classes and model student
and course respectively. The Bright class is the main class and contains the main method thus to run the
application, the Bright class initialized and uses both the Student and course class.
The Course class has two private variables; name and fees.
Design and Development of Bright College Management System using Java_2
Both of the variables are declared as private variables. Variables are then instantiated using the public
constructor which takes parameters of both variables and then instantiates them in the body. For each
variable there is a getter method which can also be referred to as accessor. This method is a public
method which can be accessed by another class. The accessor is used to access the value of the variable
held by the private variable. There is also another method called setter which is also referred to as a
mutator. The mutator is used to set or change the value of the private variable and is declared as a
public method to make it accessible outside the class.
The student class also has variables which are declared as private variables. The private variables
defining the student class are; first name, surname, dob, address, phone, email, type, studentID and
course.
This variables are passed as parameters in the public constructor of the student class. Each of the
variable has a mutator and accessor method.
The process of using getter and setter methods for the two classes is done to achieve encapsulation.
Encapsulation is the process of wrapping data and code together into a single using. A fully encapsulated
class has data members all of which are declared as private and then setter and getter methods are used
to set and get the data. Using encapsulation in java has a few advantages including;
Using getters and setters for a class makes the class write –only and read-only. For read only
classes only getter method are implemented while for write-only classes only setter methods
are implemented. This provides more control over the data.
Encapsulation helps achieve data hiding because by declaring private data members, other
classes cannot access the data members unless getter methods are implemented.
Encapsulation makes it easy to test the code especially for unit testing.
Apart from the getter and setter methods implemented in both classes, there are other methods that
define each of the classes. Both classes have an overridden toString method which returns the data of
the class as a string formatted in a specific format. Method overriding enables the subclasses to
implement a different implementation of the overridden method from the implementation of the
superclass. The overridden toString method enable the string to be returned in a specific format. The
Design and Development of Bright College Management System using Java_3
student class also has another two methods one which is get basic details which is used to get the
names and email of the student while getBalance method is used to get the remaining balance of the
student.
THe Bright class is the main class and contains the main method. The class has a declaration of two array
lists for student and course objects. Array lists are preferred to arrays because they can grow
exponentially and the size does not have to be declared during the declaration of the array list. The
array list inherits abstract list class and also implements the list interface. This makes it easier to
randomly access the list. Although they are generally slow that normal arrays, they are very useful
especially because there is going to be a lot of manipulation of the objects held in both arrays.
Testing
Add student
Pay fees
Design and Development of Bright College Management System using Java_4

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
Analysis and Design of Inventory System using Objects and Queue Data Structure
|8
|2329
|53

Core concept Figure Assignment
|9
|1726
|33

Development of Desklib Online Library Program using Java Concepts
|12
|1805
|409

Object-Oriented Design Choices in Future College Console Program
|13
|1508
|247

Design of Proposed Inventory System using Binary Trees
|7
|2306
|128

Design and Testing of Object Oriented Classes and Methods in Java
|8
|1208
|97