0% found this document useful (0 votes)
6 views7 pages

Java House Rental System Design

Uploaded by

madake1136
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views7 pages

Java House Rental System Design

Uploaded by

madake1136
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

1.

INTRODUCTION
Our project’s topic is designing a house renting system on the Java platform. We wanted to
design a system that lets users to find the favorable houses for rent. Users can find the house
which is suitable for them and rent them according to the available dates with easy payment
options so that they’ll be pleased in terms of ease of use, time spent and quality. Furnishing
economical housing with incentives generally proceed either local or universal approach. In
countries such as the US, Canada, Malaysia and India, vulnerable and low income households
are specified for supply of affordable housing. In countries such as Singapore, the
Netherlands, Sweden and Denmark, the whole population is regarded as being right owner in
affordable housing. The Netherlands, for example, has the immense portion of social housing
in the European Union, pointing out about 32% of its total housing supply and 75% of its
rental market, which ease to keep homes affordable. Many people envision the notion of
renting out their homes. They might call for the yield of extra revenue to spare money or
spend debt, or they may anticipate it as a choice for selling during a housing slump, an
approach to delay until the economy goes up. The motives are countless, but it's attainable for
this design to encounter more burden than it's worth when convenient contemplation isn't
realized. If you have fortunate enough to settle in a tourist-friendly area, like near the beach or
a major city, renting out your home as a short-term or seasonal rental may be a decent
opportunity, too. Rental housing is a significant portion of the housing market in all over the
world. For considerable property builders and investors, one method to acquire money from
the estates they retain is to rent them out to short-term or long-term landlords. Tenants who
take part in this market need to have access to principal sources of finance for initial purchase
of land and construction costs. Continuing expenses such as maintaining the buildings and
stipend managing agents are usually included by the rentals imposed on paying units in these
properties.
1.1. Aim of the Project
Nowadays, people might have some problems when renting a house. These problems arise
especially due to old-fashioned real estate methods. Some of these problems are due to some
reasons such as not being suitable the properties of houses, having a disagreement with the
landlords, and time adjustment problems for chosen home. In this system, people can acquire
the best home online without physically going to the real estate agent by just one click.
Briefly, the aim of the project is ensuring people to find the best home according to their
needs online and rent them easily.
2. IMPLEMENTATION
2.1. Structure of the Program

Figure 1: Diagram of Our Classes Structure

We designed meaningful and suitable structures for our project topic. We have separate three
final classes for each town named Istanbul, Ankara and İzmir. These three classes are also
defined as subclasses and they are inherited from the Houses class. Thus, Houses class
became our super class and it is also an abstract class . The parameters we store in Houses
class are house number, rooms, area, floor, whose type is integer, and balcony in boolean type.
Alongside, the parameter we store in town sub-classes is district. Each town subclass has their
own different district, which is string data type. We have created a static class named
Customer for storing the data from customers and processing it. Being apart from our main
structure, we have created another class named Print which allows us to send our text file to
the printer on the final page. We have one main class that includes our GUI app.

2.2. Object Oriented Concepts

• We applied encapsulation, its concept helped us to protect our data, we


defined getter and setter methods in each class except our Print class and gui class.
• Polymorphism is applied as dynamic polymorphism. We overrode the
toString() method on our subclasses named Istanbul, Izmir, Ankara.
• Inheritance is applied as described above.
• Abstract class is defined.

2.3. Implemented Classes

• We have implemented the ArrayList class and created array lists to store
every house object according to town names in their classes . We also used
arraylists ,which consists of different primitive data types, so as to fill our rent page
which allows people to see the houses on our GUI in the form of a table.
• We created many strings in our project and also implemented
StringBuffer class and used it while getting name from the user.

Figure 2: Use of StringBuffer

As you see above, we used StringBuffer class to append two strings while getting
name-surname from username.

• BigInteger class is implemented and used for assigning customer’s


phone number and id number.

• Wrapper classes are implemented. We used Integer class to cast string


types to integer type.

• Duration class is implemented to use in animation of our logo.


• LocalDate class is implemented to get the date of now, and getting the
check-out, check-in date from the user. Its methods were useful for us to do time
operations, such as getting check-in date’s day, month, year, and we used these when
we calculate the total days that a user wants to rent the house.
• ChronoUnit class is implemented to get subtraction of two dates.
2.4. Created Objects

We have created many objects. We have 33 houses in our program and each house is stored as
an object in the arraylists. We assigned house numbers, area, floor and rooms values that we
get from our Houses superclass when we create our house objects. Although the vast majority
of our variables are independent, balcony and price are dependent to the other parameters. For
example, balcony value is dependent on floor value, if it is bigger than two, balcony value is
true, also price is dependent on area value.

2.5. File Operations

We applied both read from file/write to file operations. We saved a text file that written on it
the selected house’s features, total amount to be paid by customer, customer information etc.
On the final page, we read that text file and printed on the scene. We used exception handling
(try-catch) to the handle IO exceptions.

2.6. Others

• We applied constructor chaining in the Customer class.


• The execution time of the program in nanosecond is calculated and
reported in the output, we used BigDecimal class to print execution time.

Figure 3: Output

Figure 4: The method used for calculation of the execution time

2.7. GUI Part

We have one main pane in our scene. We have created buttons for page switches. Every time
the user clicks the switch button, a new pane is brought to the main pane and the other pane is
removed from the main pane. There is an exit button on the entry page and the final page.

A GridPane named customerInformation is added to the main pane on the entry page. We also
used grid panes many times because it allows us to regulate the columns and rows to place our
nodes.

On the second page, customerInformation GridPane is removed from the main pane and
datePane GridPane is added to the our main pane. On the datePane, we used ChoiceBoxes to
get check-in date and check-out date which is customer determined. Also, we placed town
buttons on the right. We have three town options to where the renting is available for
customers.

On the third page, we have three panes and one of them will emerge according to the
customer’s choice. Panes’ names are IstPane, AnkPane and IzmirPane as GridPanes. On these
panels, there are house options and their features in the form of table.

And then, the customer selects a house and the beforefinalpane which is the fourth page and a
GridPane again, will emerge in accordance with the customer's choice. We placed a
CheckBox, a picture of the chosen house and buttons on that pane. When the user clicks to
Rent Button, the final pane will appear.

2.8. Clarification of Pages

Figure 5: Entry Page

In our entry page, we added animation, our company’s logo on the left top corner is spinning
around. . We get customer information on this page, if the required information conditions are
fulfilled, it continues to the next page. For example, someone younger than 18 cannot rent a
house.

Figure 6: Arrangement of Date and Location Page

And then, the customer opts for the check-in and check-out dates. If the subtraction of the day
between check-in and check-out dates is lower than or equal to 0, the system will give an
error, showing on the screen.

Figure 7: House Selection Page

The aftermath of filling up the location and date page, our houses selection page will occur
which contains the list of houses. Firstly, we’ve obtained the data about all houses of each
province, which is created before and stored in an arraylist, which has primitive and non
primitive data types, and then, the elements of arraylists are utilized respectively to create our
table by using for loop. We have created 3 grid panes and 3 arraylists for each provinces to
apply these table creation procedures.
Figure 8: Confirmation Page

Afterwards, if the customer decided to select the house, the confirmation page will be
emerged to check whether the customer resolve to rent the selected house or not.

Figure 9: Function of the Confirmation CheckBox

We added a CheckBox with the text which indicates the total days and total amount to be
paid, if the customer approves the rent, he/she ticks the CheckBox, then Rent Button will be
stood out.

Figure 10: Final Page

When the customer approves the rent, ticks the CheckBox and clicks the Rent Button, the
receipt that represents the customer information, the chosen house, its features, daily price and
total amount to be paid will be saved and written to a text file named “[Link]”. Later, the
final page will emerge. On the final page, there is a photo of the chosen house, an exit button,
a printing button and on the right, the [Link] is being read from the BufferedReader. The
printing button helps the customer to save this text file as a document or print it to a physical
printer.

Figure 11: Printer Pop-Up

3. CONCLUSION
We have resolved some of the problems that occur in old-fashioned real-estate systems. The
customer sees the houses that are on the database and their features and rents them for a
certain time easily. As we mentioned before, firstly, the user has to fill in the blanks about
themselves,and our system demands information about renting location and the date where
they want to reside. After that, our framework lists up the homes available in accordance with
their preferences. Thereafter, after the users choose the suitable home for themselves. Finally,
if the customers confirm renting the house, the system is going to print the rental transaction.
In our system, customers can rent a house with a few clicks on the dates that are suitable for
them. The design of our system is compatible with the aim of the project and it endorses the
main idea behind our project. In real life, the people who want to rent a house may face some
problems. In our design, people can rent a house with a few clicks. The customer doesn’t have
to make an effort to deal with the landlord or land agent. Our system is developable for the
future. There can be some features we can add to the program in the future. How the people
can rent a house, they can add their houses onto the database to rent out to someone else on
the system.
REFERENCES
Menon, A., Hodkinson, G., Galal, H., & Reckford, J. (2019). Insight Report Making
Affordable Housing a Reality in Cities. Retrieved June 25, 2020, from
[Link]
[Link]
Yuille, B. (2020, January 29). Five Tips for Renting out Your Home During a Real Estate
Slump. Retrieved June 25, 2020, from [Link]
estate/10/[Link]
Khan, Firoz. (2011). Rental Housing.

You might also like