You are on page 1of 27

Tarlac State University

COLLEGE OF COMPUTER STUDIES

__________Boarding House Management System__________

A CASE STUDY

Submitted to the Faculty of the College of Computer Studies


San Isidro Campus, Tarlac City,
Tarlac State University

In Partial Fulfillment of the Requirements for the Subject Object-Oriented Programming


Academic Year 2023-2024

Submitted By:
De Guzman, Jeffer
Diego, John Paul P.
Napiza, Noel Karl
Velasquez John Gabriel

Larsen B. Dignos
Subject Instructor

Date of submission: December 7, 2023

Table of Contents
A. INTRODUCTION..............................................................................................................................................................................................3
A.1 Objective...........................................................................................................................................................................................................3
A.2 Scope and Limitations of the Study..................................................................................................................................................................4
B. BACKGROUND OF THE STUDY...................................................................................................................................................................5
B. 1 Context.............................................................................................................................................................................................................5
B. 2 Conceptual Framework....................................................................................................................................................................................5
C. TECHNICAL BACKGROUND........................................................................................................................................................................6
C.1 Software Development Requirements...............................................................................................................................................................6
C.2 Hardware Development Requirements..............................................................................................................................................................6
D. SYSTEM METHODOLOGY............................................................................................................................................................................7
D. 1 User Requirements...........................................................................................................................................................................................7
D. 2 User Characteristic...........................................................................................................................................................................................8
F. UML........................................................................................................................................................................................................................10
G. RESULTS AND DISCUSSIONS...........................................................................................................................................................................11
G.1 Discussion.......................................................................................................................................................................................................11
G.2 Results.............................................................................................................................................................................................................11
H. SOURCE CODE.....................................................................................................................................................................................................13
I. CONCLUSION........................................................................................................................................................................................................14
J. REFERENCE...........................................................................................................................................................................................................15

A. INTRODUCTION
[1] Boarding houses play a pivotal role in addressing the housing needs of students and young professionals seeking affordable living
arrangements. The intricate processes involved in efficiently managing these shared living spaces necessitate the implementation of a Boarding
House Management System (BHMS) to streamline operations.
This study delves into the contextual deployment of a BHMS, examining industry dynamics within the continuously growing real estate and housing
sector. With rising demand for affordable living spaces, boarding houses have become integral components catering to a diverse demographic.
Within this landscape, a BHMS emerges as a strategic tool, efficiently navigating the complexities associated with managing these properties.
[2] The focus is on a hypothetical organization overseeing a network of boarding houses, each presenting unique characteristics and challenges. The
management team shoulders diverse responsibilities, from tenant management to financial tracking and property maintenance. The BHMS is
purposefully designed to support critical business processes, including efficient tenant onboarding, automated rent tracking for financial
transparency, streamlined maintenance scheduling, robust financial management tools, and enhanced communication channels. Stakeholders, such as
boarding house owners, management teams, tenants, and maintenance staff, play integral roles in the successful implementation of the BHMS.
[3] However, challenges and limitations, including data security and privacy concerns, integration challenges with existing systems, and the need for
user adoption, underscore the complexity of introducing innovative systems in this dynamic sector.
This background study provides a solid foundation for understanding the context of implementing a Boarding House Management System,
highlighting industry trends, organizational dynamics, and the multifaceted aspects of the boarding house management process. The referenced
works contribute valuable insights and perspectives to support the forthcoming case study.
A.1 Objective
Clearly state the objectives of the database, including its purpose, functionality, and intended users. This could include a description of
the data that the database is intended to capture, how it will be used, and any specific requirements or constraints that need to be
considered.

The objective of the study is the assertion statement of the problem with the general objectives and specific objectives on the
desired outcome of the research process. The study aims to achieve the following general and specific objectives.
General Objective. The researchers intended to develop an automated application entitled Boarding House Management System.
To develop a system that will integrate a Boarding House Management System in terms of the following modules:
1.1 Admin
1.1.1 Log In
1.1.2 Add rooms
1.1.3 Add rates
1.1.4 Add user
1.2 User
1.2.1 Log In
1.2.2 Add boarder
1.2.3 View boarder
1.2.4 View Paid and unpaid

A.2 Scope and Limitations of the Study

The conceptual framework for the Boarding House Management System involves a systematic development process. Input includes data from
literature and the internet, with specific software (Windows 10, MySQL, NetBeans, Eclipse, Google Collaboratory) and hardware (laptops,
PCs) requirements.

The process comprises planning, system analysis and design, development, refinement and testing, and implementation. Evaluation involves
functional testing and feedback. The output is the fully developed system, and the desired outcome is the achievement of specific objectives
for administrators (e.g., log in, manage users, add rooms) and tenants (e.g., log in, add boarders, view records). This framework ensures the
creation of a functional and user-friendly Boarding House Management System meeting the needs of both administrators and tenants.
B. BACKGROUND OF THE STUDY

B. 1 Context
Explain the context of the case study, including any relevant industry or organization information. This could include information about the
business processes that the database supports, the stakeholders involved, and any challenges or limitations that the database must overcome. At
least 3 reference

B. 2 Conceptual Framework

Give a brief description about your conceptual framework

C. TECHNICAL BACKGROUND

C.1 Software Development Requirements

SOFTWARE Image / Icon DESCRIPTION


PC/Laptop Developer Operating System.

Window 10 Operating System

Used to create a program.

Java

Used to create the database.

Xampp

Used to create the system.

Netbeans

Description for Software Development Requirements …………………..

C.2 Hardware Development Requirements


HARDWARE Image / Icon SPECIFICATION
General OS: Windows10
Display 19.5 inches.
1920 x 1080 pixels
Processor AMD A10-7850K APU with Radeon
(TM) R7 Graphics 3.70 GHz
8 GB DDR3 RAM 240 GB Solid state Drive
Connectivity
Desktop Computer
Ethernet (LAN) WIFI Bluetooth
2 x USB 2.0
2 x USB 3.0

Description for Hardware Development Requirements …………………..


D. SYSTEM METHODOLOGY

D. 1 User Requirements

Figure Number # Label

Insert description…………………..
D. 2 User Characteristic
The following are just examples of how you would create the user characteristics. Users here should be consistent as drawn in the use

case diagram. The primary user of the system is the cashier as the encoder hired by the proprietor. The administrator is the proprietor.

Neither of them is expected to be computer experts so user-friendly software shall be taken into consideration in the design. The ER

diagram and Functional Decomposition diagram will also be included in this chapter.

The admin will be able to:

1. Log into their account

2. Add rooms

3. Add rates

4. Add user

The User will be able to:

1. Log into their account

2. Add boarder

3. View boarder

4. View paid and unpaid

E. FUNCTIONAL REQUIREMENTS
Give a little description as to what to see in this chapter blah blah blah blah blah blah. Blah blah blah blah blah blah blah blah.

Table 1. Functional Requirement for __________ Module

Req.ID Requirement Description Priorit Complexity


y
FR1. Registered Users shall be able to Login to System by providing Username and High Medium
Password
 Upon successful login, users shall be redirected to the dashboard
 If incorrect, Login error message shall be displayed
FR2. If tables are divided as shown, ensure that the table header is repeated on top of High Low
the page. You can do this by highlighting the row header then right click > table
properties > row tab > click on repeat as header on top of the page

Table 2. Functional Requirement for _________ Module

Req.ID Requirement Description Priorit Complexity


y
FR1. Registered Users shall be able to Login to System by providing Username and High Medium
Password
 Upon successful login, users shall be redirected to the dashboard
 If incorrect, Login error message shall be displayed
FR2. If tables are divided as shown, ensure that the table header is repeated on top of High Low
the page. You can do this by highlighting the row header then right click > table
properties > row tab > click on repeat as header on top of the page
Table 3. Functional Requirement for__________ Module

Req.ID Requirement Description Priorit Complexity


y
FR1. Registered Users shall be able to Login to System by providing Username and High Medium
Password
 Upon successful login, users shall be redirected to the dashboard
 If incorrect, Login error message shall be displayed
FR2. If tables are divided as shown, ensure that the table header is repeated on top of High Low
the page. You can do this by highlighting the row header then right click > table
properties > row tab > click on repeat as header on top of the page
F. UML

Figure 1. Label

In this “number of this table” showcase a boarding house management. admin can add Rooms, rate, users but user can add boarder view boarder
and submit their payment.
G. RESULTS AND DISCUSSIONS

G.1 Discussion

The arrangement of whatever will be attached here – screenshots, result of survey, result of testing will depend on the objectives of the research.

If you have two objectives, follow that sequence in the presentation here. You can place a brief introductory paragraph before starting.

G.2 Results

Diagram #. Label
Include Description…………blablabla
Diagram #. Label
Include Description…………blablabla

Diagram #. Label
Include Description…………blablabla
Diagram #. Label
Include Description…………blablabla

Diagram #. Label
Include Description…………blablabla
Diagram #. Label
Include Description…………blablabla

Diagram #. Label
Include Description…………blablabla
Diagram #. Label
Include Description…………blablabla

Diagram #. Label
Include Description…………blablabla
Diagram #. Label
Include Description…………blablabla

H. SOURCE CODE

package boardinghousemanagement;

import java.awt.HeadlessException;

import java.awt.image.BufferedImage;

import java.io.File;

import java.sql.Connection;

import java.util.Date;

import java.sql.PreparedStatement;

import java.sql.ResultSet;

import java.sql.SQLException;

import java.text.SimpleDateFormat;

import javax.imageio.ImageIO;

import javax.swing.JOptionPane;

import javax.swing.table.TableModel;

import net.proteanit.sql.DbUtils;

/**

* @author user
*/

public class Boarder {

public Boarder(String RoomID, String boarderID, String firstName, String middleName,

String lastName, String brgy, String town, String prov, String mobile, String age,

String gender, String status, String type, String rateID, String pFirstName,

String pMiddleName, String pLastName, String picPath) {

setRoomID(RoomID);

setBoarderID(boarderID);

setFirstName(firstName);

setMiddleName(middleName);

setLastName(lastName);

setFullName();

setBrgy(brgy);

setTown(town);

setProv(prov);

setAddress();

setAge(age);

setGender(gender);

setStatus(status);

setType(type);

setRateID(rateID);

setParentFirstName(pFirstName);

setParentMiddleName(pMiddleName);

setParentLastName(pLastName);

setParentFullName();

setPicPath(picPath);

public static void updateBoarderTable() {

String query = "SELECT BoarderID as \"Boarder ID\", FirstName as \"First Name\", MiddleName as \"Middle Name\", "

+ "LastName as \"Last Name\", Type as \"Boarder Type\" FROM Boarders ORDER BY BoarderID;";

try {

setConnection(Database.getConnection());

setPst(connection_.prepareStatement(query));

setRs(pst_.executeQuery());

setTableModel(DbUtils.resultSetToTableModel(rs_));

catch(Exception exception) {

new Error("Cannot initialized Boarders Table.\n\nERROR: "+exception).showErrorDialog();


}

public Boarder() {

public static void getBoarder(String boarderID) {

String query = "SELECT ActiveBoarders.RoomID, "

+ "Boarders.BoarderID, Boarders.FirstName, Boarders.MiddleName, "

+ "Boarders.LastName, Boarders.Brgy, Boarders.Town, Boarders.Province, "

+ "Boarders.Status, Boarders.Age, Boarders.Gender, Boarders.MobileNo, Boarders.PicPath "

+ "FROM ActiveBoarders INNER JOIN Boarders ON Boarders.BoarderID=ActiveBoarders.BoarderID "

+ "WHERE ActiveBoarders.BoarderID = "+Integer.parseInt(boarderID)+";";

try {

setConnection(Database.getConnection());

setPst(getConnection().prepareStatement(query));

setRs(getPst().executeQuery());

while(getRs().next()) {

setRoomID(getRs().getString("RoomID"));

setBoarderID(getRs().getString("BoarderID"));

setFirstName(getRs().getString("FirstName"));

setMiddleName(getRs().getString("MiddleName"));

setLastName(getRs().getString("LastName"));

setFullName();

setBrgy(getRs().getString("Brgy"));

setTown(getRs().getString("Town"));

setProv(getRs().getString("Province"));

setAddress();

setStatus(getRs().getString("Status"));

setAge(getRs().getString("Age"));

setGender(getRs().getString("Gender"));

setMobile(getRs().getString("MobileNo"));

setPicPath(getRs().getString("PicPath"));

catch(Exception exception) {

new Error("Error getting Boarder "+boarderID+" Data.\n\nERROR: "+exception).showErrorDialog();

}
public static TableModel getActiveBoarders() {

String query = "SELECT ActiveBoarders.RoomID, Boarders.BoarderID, Boarders.FirstName, "

+ "Boarders.MiddleName, Boarders.LastName "

+ "FROM ActiveBoarders INNER JOIN Boarders ON ActiveBoarders.BoarderID=Boarders.BoarderID "

+ "ORDER BY ActiveBoarders.RoomID;";

try {

setConnection(Database.getConnection());

setPst(connection_.prepareStatement(query));

setRs(pst_.executeQuery());

return DbUtils.resultSetToTableModel(rs_);

catch(Exception exception) {

new Error("Cannot initialized Boarders Table.\n\nERROR: "+exception).showErrorDialog();

return null;

public void addBorder() {

String query = "INSERT INTO Boarders (BoarderID, FirstName, MiddleName, LastName, "

+ "Brgy, Town, Province, Age, Gender, Status, MobileNo, "

+ "P_fName, P_mName, P_lName, Type, PicPath) "

+ "VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);";

try {

setConnection(Database.getConnection());

setPst(getConnection().prepareStatement(query));

getPst().setInt(1, Integer.parseInt(getBoarderID()));

getPst().setString(2, getFirstName());

getPst().setString(3, getMiddleName());

getPst().setString(4, getLastName());

getPst().setString(5, getBrgy());

getPst().setString(6, getTown());

getPst().setString(7, getProv());

getPst().setInt(8, Integer.parseInt(getAge()));

getPst().setString(9, getGender());

getPst().setString(10, getStatus());

getPst().setString(11, getMobile());

getPst().setString(12, getParentFirstName());
getPst().setString(13, getParentMiddleName());

getPst().setString(14, getParentLastName());

getPst().setString(15, getType());

uploadPhoto();

getPst().setString(16, getPicPath());

getPst().executeUpdate();

pst_.close();

query = "INSERT INTO ActiveBoarders (BoarderID, RoomID, RateID, DateAdded) VALUES (?, ?, ?, ?);";

setPst(getConnection().prepareStatement(query));

getPst().setInt(1, Integer.parseInt(getBoarderID()));

getPst().setString(2, getRoomID());

getPst().setInt(3, Integer.parseInt(getRateID()));

getPst().setString(4, String.valueOf(new SimpleDateFormat("MMMM dd, yyyy").format(new Date())));

getPst().executeUpdate();

pst_.close();

JOptionPane.showMessageDialog(null, "New Boarder "+getBoarderID()+" Saved!", "", JOptionPane.INFORMATION_MESSAGE);

Rooms.updateNoOfBoarders(getRoomID());

catch(SQLException | NumberFormatException exception) {

new Error("Cannot save Boarder "+getBoarderID()+"\n\nERROR: "+exception).showErrorDialog();

public static void deleteBorder(String boarderID, String roomID) {

String query = "DELETE ActiveBoarders.*, Boarders.* FROM ActiveBoarders INNER JOIN Boarders "

+ "ON ActiveBoarders.BoarderID=Boarders.BoarderID "

+ "WHERE ActiveBoarders.BoarderID="+Integer.parseInt(boarderID)+"; ";

try {

deletePhoto(boarderID);

setConnection(Database.getConnection());

setPst(getConnection().prepareStatement(query));

getPst().execute();

JOptionPane.showMessageDialog(null, boarderID+" Deleted", "", JOptionPane.INFORMATION_MESSAGE);


Rooms.updateNoOfBoarders(roomID);

catch(SQLException | HeadlessException exception) {

new Error("Error Deleting Boarder "+boarderID+" ERROR\n\nERROR: "+exception).showErrorDialog();

private void uploadPhoto() {

File out = null;

File file;

BufferedImage newImg = null;

file = new File(getPicPath());

try {

newImg = ImageIO.read(file);

out = new File("Images/"+"Boarder "+getBoarderID()+" - pic.png");

catch(Exception exception) {

new Error("ERROR READING IMAGE!\n\nERROR: "+exception).showErrorDialog();

try {

ImageIO.write(newImg, "png", out);

setPicPath(out.toString());

catch (Exception exception) {

new Error("ERROR UPLOADING IMAGE!\n\nERROR: "+exception).showErrorDialog();

private static void deletePhoto(String boarderID) {

String query = "SELECT PicPath FROM Boarders WHERE BoarderID="+Integer.parseInt(boarderID)+";";

File file = null;

try {

setConnection(Database.getConnection());

setPst(getConnection().prepareStatement(query));

setRs(getPst().executeQuery());

while(getRs().next()) {

file = new File(getRs().getString("PicPath"));

if(file.delete()) {

}
else {

new Error("Error deleting File.").showErrorDialog();

catch(Exception exception) {

new Error("Error deleting File.\n\nERROR: "+exception).showErrorDialog();

public static String getRoomID() {

return RoomID_;

public static void setRoomID(String RoomID) {

RoomID_ = RoomID;

public static String getBoarderID() {

return BoarderID_;

public static void setBoarderID(String BoarderID) {

BoarderID_ = BoarderID;

public static String getFirstName() {

return firstName_;

public static void setFirstName(String firstName) {

firstName_ = firstName;

public static String getMiddleName() {

return middleName_;

public static void setMiddleName(String middleName) {

middleName_ = middleName;

public static String getLastName() {

return lastName_;
}

public static void setLastName(String lastName) {

lastName_ = lastName;

public static String getFullName() {

return fullName_;

public static void setFullName() {

fullName_ = getFirstName()+" "+getMiddleName()+" "+getLastName();

public static String getBrgy() {

return brgy_;

public static void setBrgy(String brgy) {

brgy_ = brgy;

public static String getTown() {

return town_;

public static void setTown(String town) {

town_ = town;

public static String getProv() {

return prov_;

public static void setProv(String prov) {

prov_ = prov;

public static String getAddress() {

return address_;

public static void setAddress() {

address_ = getBrgy()+", "+getTown()+", "+getProv();

public static String getAge() {

return age_;

public static void setAge(String age) {

age_ = age;

public static String getGender() {


return gender_;

public static void setGender(String gender) {

gender_ = gender;

public static String getMobile() {

return mobile_;

public static void setMobile(String mobile) {

mobile_ = mobile;

public static String getParentFirstName() {

return parentFirstName_;

public static void setParentFirstName(String parentFirstName) {

parentFirstName_ = parentFirstName;

public static String getParentMiddleName() {

return parentMiddleName_;

public static void setParentMiddleName(String parentMiddleName) {

parentMiddleName_ = parentMiddleName;

public static String getParentLastName() {

return parentLastName_;

public static void setParentLastName(String parentLastName) {

parentLastName_ = parentLastName;

public static String getParentFullName() {

return parentFullName_;

public static void setParentFullName() {

parentFullName_ = getParentFirstName()+" "+getMiddleName()+" "+getLastName();

public static String getStatus() {

return status_;

public static void setStatus(String status) {

status_ = status;

public static String getType() {


return type_;

public static void setType(String type) {

type_ = type;

public static String getRateID() {

return rateID_;

public static void setRateID(String rateID) {

rateID_ = rateID;

public static String getPicPath() {

return picPath_;

public static void setPicPath(String picPath) {

picPath_ = picPath;

public static Connection getConnection() {

return connection_;

public static void setConnection(Connection connection) {

connection_ = connection;

public static PreparedStatement getPst() {

return pst_;

public static void setPst(PreparedStatement pst) {

pst_ = pst;

public static ResultSet getRs() {

return rs_;

public static void setRs(ResultSet rs) {

rs_ = rs;

public static TableModel getTableModel() {

return tableModel_;

public static void setTableModel(TableModel tableModel) {

tableModel_ = tableModel;

private static String RoomID_;


private static String BoarderID_;

private static String firstName_;

private static String middleName_;

private static String lastName_;

private static String fullName_;

private static String brgy_;

private static String town_;

private static String prov_;

private static String address_;

private static String age_;

private static String gender_;

private static String mobile_;

private static String parentFirstName_;

private static String parentMiddleName_;

private static String parentLastName_;

private static String parentFullName_;

private static String status_;

private static String type_;

private static String rateID_;

private static String picPath_;

private static Connection connection_;

private static PreparedStatement pst_;

private static ResultSet rs_;

private static TableModel tableModel_;

}
I. CONCLUSION
Write the general statement that says you achieved the objective here. Then specifically, itemize the conclusion based on the stated objective

in Chapter 1 as follows. There is one is to one correspondence with respect to the objectives and conclusion.

1. Conclusion of objective number 1.

2. Conclusion of objective number 2.

Write another paragraph here for future directions. Take note that you may also consider adding the limitations that you identify in

Chapter 1 as part of your future works. Your recommendations also goes here.

J. REFERENCE
Use IEEE format.

You might also like