Combo Offer 30% Off + 5% Extra OFF

Atm Machine Simulation Using Java Assignment Sample

Order on WhatsApp Get Upto 50% off
Securing Higher Grades Costing Your Pocket? Book Your Assignment At The Lowest Price Now!
  • Order on Whatsapp
X

Atm Machine Simulation Using Java Assignment Sample

Introduction:

Get free samples written by our Top-Notch subject experts for taking online assignment help & australian assignment help services 

Object-oriented programming is a type of programing paradigm that is the basis of the concept of object. Object-oriented programing contains code and data. The data contains in the object-oriented programing contains fields and the code of the object-oriented programing that contains all the procedures. A special feature of the object is that the own procedure of the object can be accessed and that it can modify the fields of the data by itself. Java is a type of object-oriented language of programming which was developed in 1995 by a company called "sun Microsystems". In this above-mentioned project, the developer needs to build a program on the java platform to simulate the atm machine. At first, the customer is needed to enter the user name and the password of the customer. All the user names are saved in the database, which is developed in the platform of java language. After entering the user name and the password of the customer properly, the main page will be shown. On the main page of the atm machine, all the options of withdrawing amount, checking the current balance, option of depositing the amount, changing the pin number of the atm card of the customer. Each of the above mentioned menu will have a sub-menu also, except the option of quitting. After each of the following functions, the return on the main menu should be displayed. If any customer chooses the option of quitting, the software will automatically return on the main menu of the atm.   

Aim and objects:

The aim of the above-mentioned project is to develop software which is based on java language, which will simulate the atm machine of a particular bank. Java language, which is an object-oriented language of programming, is based on class. Java language is designed to implement some programing language. Nowadays, java language becomes the number one language of programing, and it is used to develop some programing. The advantage of using the Java language is that it reduces the cost of development. The time needed to develop a java language is shorter than the time taken to build the other language. The developer needs to develop a database on the platform of java coding language to run an ATM machine. The database will consist of all the username and password of the atm card of all the customers of the following bank. If the username of any customer will not be contained in the database, the customer will not be able to do any banking related job through atm. If the username was matched on the database, then the customer is asked to enter the password; once the password is matched then only the customer will be able to deposit and withdraw money, change the pin and the username himself and can check the balance of the account of the user. In each section, there will have a menu of returning on the homepage except the quit page. After the end of banking of the customer, the quit option is to be shown, and by clicking the quit option, the customer can return on the main page of the atm.  

Implementation:

This project is based upon making an atm machine. The application is developed using java in apache netbeans application. The function that is implemented is according to the instructions provided in the job card. At first main function has been taken. Login function will execute at first, as this is mentioned in the main function. Menu function is created for displaying the options that are provided to the user as per the job card. Check balance function has been created if user want view his balance. Then withdraw function enables user the facility to take out money and the money that is taken will be deducted from the net balance. That will be displayed in the database named atm. Next deposit function will provide user the facility to deposit mone and that money will be added to the net amount in the atm. That also will be displayed in the database. Change password is simply for changing the current password and while changing it, system will ask for the current password and thn only user can change the password. Last but not the least is the exit function. If user is done with his business then he can exit and it will go back to the menu.

Discussion:

The developer needs to develop a database on the java language of programming, which will simulate the atm machine of a bank (Mahmoud, et al 2019),. Java is a type of object-oriented programming language which was developed in the year 1995 by a company called "sun Microsystems".  Nowadays, java language becomes the number one language of programing, and it uses to develop some programing (Dadkhah, et al 2020). At first, the username of every customer is needed to enter into the database. In the atm machine, the customer will enter the user name of the following customer (Cabada, , et al 2018). The software will check if the username that is entered by the customer will match the username that is given in the database of the bank, then only the customer can proceed for further work(Butt, et al 2017). Otherwise, the customer will be unable to access the aim. Then the customer needs to enter a unique password of the customer (Gusarovs, 2018). Then the software will check if the entered password is correct or not. If the entered password is the correct password, then the software will allow access to the next page of the processing or else the entered password is the wrong one, the software will return to the original page (Garousi, et al 2017). On the main page, there are several options for banking like depositing of amount, withdrawal of amount, checking of the balance of the account or changing the username and pin of the aim (Mishra, et al 2017). There are different kinds of account types like current account, savings account, a business account that were defined in the software. At the end of each of the following processes will have an option to return the main menu, and the software will run the main menu. There will be an option of quit menu, which will have the option of returning on the main menu directly (Gómez , et al  2017).  

Testing:

Software testing is a process of testing which includes the process of execution of software or a component of a system which will evaluate more properties (Alaqail , et al 2018). The testing of the following software is a method to check if the product of the actual software will meet all the requirements and the software will run without any lacking (Rana, et al 2019). The technique will involve the execution of the component of the system or the component of the software by using the tools that automated or manual tools for evaluating the interest of one or many more properties (Malik, 2017). The main agenda of testing the software is to detect the errors of the software, the lacks of the software and the requirement that are missing in the software, which will contrast the actual requirement of the software. For the above project, the developer will run the entire code time and again to see if three ios lack coding of the software. And the developer will check if the data are uploaded to the database properly. The entire databases that are inserted are correct or not. If the database is wrong, then the software will not work properly (Abdallah , et al 2017). Then after entering the inputs like username, password etc., the data need to fetch properly. Otherwise, the software will not be able to run properly (Grgic, et al 2018).  

Conclusion:

The developer will develop a database that will simulate the atm machine. The databases will be developed on the platform of java coding language. The advantage of using the Java language is that it reduces the cost of development. The time needed to develop a java language is shorter than the time taken to build the other language. In the above project, the developer builds a database that includes all the details and the usernames of all the customers of the following bank.  The user needs to enter the username at the beginning of processing the atm. Once the username is accepted by the software, then only the customer will be able to give the respective password of the bank. If the username is not matching, the customer will be unable to access the atm machine. After that, the customer will be able to see the home page. On the home page, there are many options for banking like depositing the amount, withdrawing the money from the savings account or current account or business account of the customer of the bank. The customer can change the password or the pin number of the atm card through that page. Each of the following pages will show an option of returning on the home page. At the end of the process, there will be an option to quit. By using that option, the customer can return to the home page after completing the banking work.

Appendices

Appendix 1: Code

public static void main(String[] args)

                                                        

 {

        logIn();

 

           }

    public static void logIn()

{

        try

{

            Scanner sc=new Scanner(System.in);

            System.out.println("Enter Username: ");

            username=sc.nextLine();

            Connection conn = DriverManager.getConnection("jdbc:mysql://localhost/ATM","root", "");

            Statement stmt = conn.createStatement();

 

            String query;

            query = "select * from user where username='"+username+"'";

            ResultSet rs = stmt.executeQuery(query);

            int id = 0;

            int pass = 0;

            while(rs.next())

{

                id = rs.getInt("user_id");

                pass = rs.getInt("password");

            }

            if(id>0)

 

{

                System.out.println("Account exists");

                System.out.println("Enter Password: ");

                int Password=sc.nextInt();

                if(Password==pass)

{

                    menu();

                }

                else{

                    System.out.println("Account doesn't exist");

                    System.out.println("Invalid Password! ");

                }

            }

            else {

                System. out.println("Invalid Username! ");

            }

        } catch (SQLException ex)

{

            Logger.getLogger(ATM.class.getName()).log(Level.SEVERE, null, ex);

        }

 public static void menu()

{

        System.out.println("menu: ");

 

        System.out.println("Press 1 for Check Balance ");

        System.out.println("Press 2 for Withdraw ");

        System.out.println("Press 3 for Deposit ");

        System.out.println("Press 4 for Change Password ");

        System.out.println("Press 5 to Exit");

        Scanner sc=new Scanner(System.in);

        int Ch=sc.nextInt();

        switch (Ch)

{

            case 1:

                CheckBalance();

                break;

            case 2:

                withdraw();

                break;

            case 3:

                deposit();

                break;

            case 4:

changepassword();

                break;

            default:

                exit();

                break;

        }

 public static void CheckBalance()

{

        try {

            Connection conn = DriverManager.getConnection("jdbc:mysql://localhost/ATM","root", "");

            Statement stmt = conn.createStatement();

            String query2 = "select * from user where username='"+username+"'";

            ResultSet rs = stmt.executeQuery(query2);

            int balance = 0;

            while(rs.next())

 

{

                balance = rs.getInt("balance");

            }

            System.out.println("Balance: "+balance);

            System.out.println("Press 1 to Exit or Press 2 for Menu ");

            Scanner sc=new Scanner(System.in);

            int ch=sc.nextInt();

            if(ch==1)

{

                exit();

            }

            if(ch==2)

 

{

                menu();

            }

        } catch (SQLException ex) {

            Logger.getLogger(ATM.class.getName()).log(Level.SEVERE, null, ex);

        }

    }

 public static void withdraw()

{

        try {

            System.out.println("Enter Amount: ");

            Scanner sc=new Scanner(System.in);

            int Amount=sc.nextInt();

            Connection conn = DriverManager.getConnection("jdbc:mysql://localhost/ATM","root", "");

            Statement stmt = conn.createStatement();

            String query = "select * from user where username='"+username+"'";

            ResultSet rs = stmt.executeQuery(query);

            int balance = 0;

            int pass= 0;

            while(rs.next()){

                balance = rs.getInt("balance");

                pass=rs.getInt("password");

            }

            System.out.println("Enter Password: ");

            int Password=sc.nextInt();

            if(Password==pass)

{

                if(balance>Amount)

{

                    int newbalance=balance-Amount;

.

                    String query2="update user set balance="+newbalance+" where username='"+username+"'";

                    stmt.executeUpdate(query2);

                    System.out.println("Amount withdrawal");

                }

                else{

                    System.out.println("Insufficient balance");

                }

            }

            else{

                System.out.println("Invalid Password! ");

            }

        } catch (SQLException ex) {

            Logger.getLogger(ATM.class.getName()).log(Level.SEVERE, null, ex);

        }

 

 

    }

 public static void deposit()

{

        try {

            System.out.println("Enter Amount: ");

            Scanner sc=new Scanner(System.in);

            int Amount=sc.nextInt();

            Connection conn = DriverManager.getConnection("jdbc:mysql://localhost/ATM","root", "");

            Statement stmt = conn.createStatement();

            String query = "select * from user where username='"+username+"'";

            ResultSet rs = stmt.executeQuery(query);

            int balance = 0;

            int pass= 0;

            while(rs.next()){

                balance = rs.getInt("balance");

                pass=rs.getInt("password");

            }

            System.out.println("Enter Password: ");

            int Password=sc.nextInt();

            if(Password==pass)

 

{

                System.out.println("Amount deposited ");

                if(balance>Amount)

{

                    int newbalance=balance+Amount;

 

                    String query2="update user set balance="+newbalance+" where username='"+username+"'";

                    stmt.executeUpdate(query2);

                    System.out.println("Amount deposited");

                }

                logIn();

 

            }

            else{

                System.out.println("invalid password");.

            }

        } catch (SQLException ex) {

            Logger.getLogger(ATM.class.getName()).log(Level.SEVERE, null, ex);

        }

 

    }

 public static void change password()

{

        try {

            System.out.println("Enter Current Password: ");

            Scanner sc=new Scanner(System.in);

            int CPassword=sc.nextInt();

            Connection conn = DriverManager.getConnection("jdbc:mysql://localhost/ATM","root", "");

            Statement stmt = conn.createStatement();

            String query = "select * from user where username='"+username+"'";

            ResultSet rs = stmt.executeQuery(query);

 

            int pass= 0;

            while(rs.next())

{

 

                pass=rs.getInt("password");

            }

            if(CPassword==pass)

{

                System. out.println("Enter New Password: ");

                int NPassword=sc.nextInt();

                System.out.println("Confirm Password: ");

                int ConPassword=sc.nextInt();

                if(ConPassword==NPassword)

{

                    String query2 = "update user set password="+NPassword+" where username='"+username+"'";

                    stmt.executeUpdate(query2);

                    logIn();

                }

                else{

                    changepassword();

                }

            }

            else{

                System. out.println("Invalid Password!");

            }

        } catch (SQLException ex) {

            Logger.getLogger(ATM.class.getName()).log(Level.SEVERE, null, ex);

        }

 

    }

    public static void exit()

{

        System.out.println("Exit");

        logIn();

}

 

Reference list:

Journals:

Mahmoud, A., Venkatagiri, R., Ahmed, K., Misailovic, S., Marinov, D., Fletcher, C.W. and Adve, S.V., 2019, April. Minotaur: Adapting software testing techniques for hardware errors. In Proceedings of the Twenty-Fourth International Conference on Architectural Support for Programming Languages and Operating Systems (pp. 1087-1103).

Dadkhah, M., Araban, S. and Paydar, S., 2020. A systematic literature review on semantic web enabled software testing. Journal of Systems and Software, 162, p.110485.

Butt, F.L., Bhatti, S.N., Sarwar, S., Jadi, A.M. and Saboor, A., 2017. Optimized order of software testing techniques in agile process–A systematic approach. International Journal of Advanced Computer Science and Applications (IJACSA), 8(1).

Mishra, D., Ostrovska, S. and Hacaloglu, T., 2017. Exploring and expanding students’ success in software testing. Information Technology & People.

Gómez, O.S., Cortés-Verdín, K. and Pardo, C.J., 2017. Efficiency of software testing techniques: A controlled experiment replication and network meta-analysis. e-Informatica Software Engineering Journal, 11(1).

Garousi, V. and Felderer, M., 2017. Worlds apart: industrial and academic focus areas in software testing. IEEE Software, 34(5), pp.38-45.

Alaqail, H. and Ahmed, S., 2018. Overview of software testing standard ISO/IEC/IEEE 29119. International Journal of Computer Science and Network Security (IJCSNS), 18(2), pp.112-116.

Rana, I., Goswami, P. and Maheshwari, H., 2019. A review of tools and techniques used in software testing. Int. J. Emerg. Technol. Innovative Res, 6(4), pp.262-266.

Malik, S., 2017. Software testing: Essential phase of sdlc and a comparative study of software testing techniques. International Journal of System & Software Engineering, 5(2), pp.38-45.

Abdallah, M.M. and Al-Rifaee, M.M., 2017. Java Standards: A Comparative Study. International Journal of Computer Science and Software Engineering, 6(6), p.146.

Grgic, H., Mihaljevi?, B., A. and Radovan, 2018, May. Comparison of garbage collectors in Java programming language. In 2018 41st International Convention on Information and Communication Technology, Electronics and Microelectronics (MIPRO) (pp. 1539-1544). IEEE.

Gusarovs, K., 2018. An analysis on Java programming language decompiler capabilities. Applied Computer Systems, 23(2), pp.109-117.

Cabada, R.Z., Estrada, M.L.B., Hernández, F.G., Bustillos, R.O. and Reyes-García, C.A., 2018. An affective and Web 3.0-based learning environment for a programming language. Telematics and Informatics, 35(3), pp.611-628.

 

 

Free Download Full Sample Free Download Full Sample
Get best price for your work

offer valid for limited time only*

Get a callback
In a Hurry-Get a Callback

© Copyright 2021 | New Assignment Help | All rights reserved