Individual Assignment AAPP004-4-2-JP Java Programming UCDF1909ICT (SE)

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 15

INDIVIDUAL ASSIGNMENT

AAPP004-4-2-JP
Java Programming
UCDF1909ICT(SE)

Hand Out Date: 22 June 2021


Hand In Date: 8 August 2021
Weightage: 60%

Student Name: Chong Vun Chung


Lecture Name: Dr. Tan Chye Cheah
Table of Contents
Sample Outputs........................................................................................................................3

Start-up page...........................................................................................................................3

Register...................................................................................................................................3

Login.......................................................................................................................................4

Add customer profile..............................................................................................................5

Search and update customer profile.......................................................................................6

Withdrawal.............................................................................................................................7

Deposit....................................................................................................................................9

Object-Oriented Concepts and Java Features....................................................................10

Inheritance............................................................................................................................10

Encapsulation.......................................................................................................................10

Method..................................................................................................................................11

Validation.............................................................................................................................11

Assumptions............................................................................................................................12

References...............................................................................................................................13
Sample Outputs

Start-up page

This is the first page of the bank application system where user can register and login
to the bank application.

Register

If user has no account for the bank application, user may register username and
password first in order to log in. After user register, a window message will be pop out with
“registered successfully” message in it.
Login

After user has registered successfully, user may log in now by clicking the login
button, if the username and password is correct then show pop out message “login
successfully”, if it is incorrect, then show pop out message “Username or password is
incorrect”. Once login successfully, this window will close, and the main page of bank will
open.
Validation will be occurred when user did not login properly, where the specific data
is required when the data is empty. However, error message that written as “Username and
password is incorrect” will be occurred too when either username or password is not correct.
Add customer profile

After logging in, user is able to add customer profile first in order to proceed to other
functions like edit customer profile, withdrawal and deposit function. From this page, there
are 4 panel at the top of the page which represent different functions. These functions will be
discussed soon.

After user has completely fill in all the customer details, click add button to add the
customer profile in a text file where it needed for other functions later. “Customer added
successfully” will be pop out after added successfully.
Search and update customer profile

This is the edit and update customer profile functions which let user to search
customer by insert the account number which added earlier, and then able to edit and update
details. Search button is to read the file from the add customer file that created earlier and
retrieve it into the text field.

Customer profile can only be edited is the email as the name, customer ID and
balance is not allowed to edit. After the user done editing the customer profile, user should
click update button to update the customer profile and “updated successfully” message will
pop out if update successfully.
Withdrawal

The next function is the withdrawal functions where user search customer by entering
account number and may proceed to withdraw money. Account type and balance will be
retrieved and read from the customer file.

From the withdrawal function, there is a limit to withdraw from the balance. When the
account type is saving, minimum balance of 100 must be remained in the balance. However,
if the account type is current, minimum balance of 500 must be remained in the balance as
well. If user withdraw exceed the minimum balance amount, error message will be occurred
as “you are not available to withdraw the amount in your account. Please try again.”.
Besides, when user withdraw a specific amount from the balance, a pop out message
will be written as “Withdraw successfully, your balance is now (balance)”. The number from
the pop out message is the updated balance after user successfully withdraw from the
balance.
Deposit

The next function is the deposit functions where user search customer by entering
account number and may proceed to deposit money. Account type and balance will be
retrieved and read from the customer file.

Besides, when user deposit a specific amount from the balance, a pop out message
will be written as “Deposit successfully, your balance is now (balance)”. The number from
the pop out message is the updated balance after user successfully deposit amount into the
balance.
Object-Oriented Concepts and Java Features

Inheritance

Inheritance is a feature of Object-Oriented Programming that allow to create new


classes to share the attributes with the main class. From here, Customer class extends to Main
class that lets the functions and code which is written in the Customer class can also be used
in Main class as well.

Encapsulation

This is an encapsulation Object-Oriented programming feature where it is


considered as a private class that is very sensitive with the data. It also involves
the get and set methods to read and update the data of it. From the image above,
get is getText() which is to return data from the database, however for set, can
be known as setText() is to set the data to the output.
Method

Method is like a function where is written in a class. From this method, it shows that
void withdraw is to update the balance whenever there is changes in the balance and this
method has no return value as well.

Validation

This validation is to validate the username and password to check whether the details is an
empty detail. If the data is empty, then validation will be appeared with the message that is written
as “data Is required”.
Assumptions

First of all, user must own an account to login into the bank application system. If
user has no account, then user must register first. After registration is completed, user can
login and able to access into the bank application system.

When login is success, user is able to add customer profile with the only selected text
field to fill in only. Bank account for customer is available for each customer only which are
saving account and current account. Moreover, user can also edit customer profile but only
selected details of the profile only. Data such as name, customer ID and balance is not
allowed to edit and update.

Besides, user may withdraw and deposit any amount of money into their own bank
account but with some terms and conditions of the minimum balance of the customer.
Customer’s saving account and current account have a minimum balance which let user fail
to withdraw when exceed the minimum balance. Minimum balance for saving account is 100
and current account is 500. Therefore, when the account type is saving account, balance
amount can not be remained under 100, meanwhile account type for current account also can
not be remained under 500. Whenever minimum balance is exceeded according to the
specific account type, withdraw function will be cancel immediately with error message.
Other than that, deposit function has no limit for user to deposit.
References

1. Altvater, A. (2017) What are OOP concepts in java? the four main OOP concepts in
java, how they work, examples, and more. [Online]. Available from:
https://stackify.com/oops-concepts-in-java/ [Accessed: 1st Aug 2021].

2. Jaiswal, S. (2020) Java string valueof(). [Online]. Available from:


https://www.javatpoint.com/java-string-valueof [Accessed: 16th July 2021].

3. Jaiswal, S. (2020) Java string trim(). [Online]. Available from:


https://www.javatpoint.com/java-string-trim [Accessed: 16th July 2021].

4. Rapidclicks (2019) Login and register from txt file using java. [Online]. Available
from: https://www.youtube.com/watch?
v=EeY5rhGdfIE&t=1119s&ab_channel=RAPIDCLICKS [Accessed: 28th June 2021]

You might also like