We have been working very hard since 2009 to facilitate in your learning Read More. We can't keep up without your support. Donate Now.

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More

Please read the following instructions carefully before solving & submitting assignment:

 

Uploading Instructions:

  • Use NetBeans IDE for this assignment development.
  • After finalizing, compress all files with Zip or RAR format.
  • Rename it to your own Student Id(g. bs000000000.rar).
  • And submit at VU-LMS within due date.

 

Rules for Marking:

It should be clear that your assignment will not get any credit if:

 

  • Provided Student ID is wrong.
  • Any other software/IDE (except NetBeans IDE) is used for assignment development.
  • Assignment is not submitted in .zip/.rar format.
  • Assignment is submitted after due date or via email.
  • Submitted assignment does not open or file is corrupted.
  • Assignment is fully or partially copied from other student or ditto copy from handouts or Internet; strict disciplinary action will be taken in this case.
  • Submitted code is unable to compile/execute in NetBeans IDE;during evaluation, submitted code will be checked on NetBeans IDE. If unable to execute then ZERO marks will be awarded and no excuses will be accepted in this regard.

 

 

Note:Do not put any query on MDB regarding this assignment, if you have any query then email at cs506@vu.edu.pk

Lectures Covered: This assignment covers Lecture # 23- 30

 

GOOD LUCK


 

Problem Statement:

You are required to deploya simple web application using Apache Tomcat Server, named MyATM, which should simulate behavior of a typical ATM (Automated Teller Machine). In which a user, after entering card details,can deposit amount, withdraw cash, and check current balance. The program should be based on a user-friendlyweb interface; need to use Java Servlet technology for this purpose. Further, all information must be savedin a backend database using MS Access.

 

Detailed Description:

The program should facilitate multiplecustomers (each contains unique card no). For this purpose, you need to develop an html page (index.html) which should contain aninput form, as shown in figure 1.

 

Fig.1: Input Form (index.html)

The customer should be able to view ATM services byusing card no and pincode.Therefore,write a Java Servlet named as LoginServlet.java that will receive submitted information from input form (i.e. index.html) and verify input values; whether entered values are correct or not. If authentication is invalid, then print back amessage "Invalid Card No or wrong Pin Code".

 

If customercredentials (i.e. card no and pin code) are correct, jump to ATM Services Page(i.e. ServicesServlet.java) which should list down the following services(shown in figure 2).

Fig.2: ATM Services (ServicesServlet.java)

  1. Deposit Amount
  2. Cash Withdraw
  3. Check Balance

 

 

  1. Deposit Amount:

 

Each time, user selects this option, s/he will be prompted to enter money for deposit (using DepositServlet.jata) that must be in multiple of Rs. 500/-(hint is given below) and up to a maximum of Rs. 25000/- per transaction. If inputs are correct,then the amount must be added in current balance and as well as in database. However, in case of wrong input, appropriate message should be displayed.

 

Fig. 3: Deposit Amount (DepositServlet.java)

  1. Withdraw Cash:

 

User can withdraw any cash but in multiple of Rs. 500/- (hint is given below) and up to a maximum of Rs. 25000/- per transaction by using this option; WithdrawServlet.java should serve here. However, if balance is zero or withdraw amount is greater than the current balance, then appropriate message should be displayed. Otherwise, amount must be deducted from current balance and database should be maintained as well.

 

Fig. 4: Cash Withdraw (WithdrawServlet.java)

 

  1. Check Balance:

 

The program should fascinate the user by displaying the current balance via Java Servlet named BalanceServlet.java

Fig. 5: Check Balance (BalanceServlet.java)

 

Note: At the end of each successful transaction, the user must be asked to proceed with another transaction or not; if yes then start from displaying ATM services again and if not then show web developer information (student id, name and email address) via an HTML page (info.html),as shown infigure 6.

 

 

Fig. 6: Developer Info (info.html)

Required Stuff:

You do not need to submit complete NetBeans IDE projects. Rather, just submit the following files in compressed (.zip or .rar) format.

Html Pages:

index.html

info.html

Java Servlets:

LoginServlet.java

ServiesServlet.java

DepositServlet.java

WithdrawServlet.java

BalanceServlet.java

Java Classes:

DebitCart.java

AccountManager.java(should contain transactionsrelated code)

DbHelper.java(should contain database related code)

Database file:

BSxxxxxxxx.accdb (must be same as your own VU student id)

 

 

 

 

 

 

 

Fig. 7: Folder "assets" under web directory

Sample Data:

Id

Username

Card No

Pin Code

Balance

1

Ahmad

2020-1001

1041

3000

2

Ali

2020-1002

1226

0

3

Sana

2020-1003

2592

7000

4

Amna

2020-1004

6372

12000

5

Umar

2020-1005

9241

25000

 

Tab. 1: Sample Users Data

 

Tab. 2: Users Table in MS Access Database file

Hint:

if (amount % 500 == 0) {

     // it is a multiple of 500.

}

 

Video Tutorials:                                           

  • To download and install of Tomcat Server, please watch;

https://vulms.vu.edu.pk/Courses/CS506/Downloads/Tomcat_Server_Insta...

  • To create a web application project in NetBeans IDE, please watch;

https://vulms.vu.edu.pk/Courses/CS506/Downloads/Web_Application_in_...

  • To add ucanaccess driver in a NetBeans project, please watch;

https://vulms.vu.edu.pk/Courses/CS506/Downloads/UCanAccess_Driver_Installation.mp4

 

Important Things to Implement:

  • You have to provide separate html pages, servlets andJava classes as guided above. Merging of two or more will result in deduction of marks.
  • You need to put database file in assets folder under NetBeans IDE project web directory along with html pages, as shown in figure 7.
  • For storing/fetchingdata to/from database, you will need to use proper SQL queries.
  • You can use same DebitCard and DbHelper Java classes as provided in assignment # 1 & 2 and can make changes as required.
  • Java classes must have proper Data Members and Member Functions along with Constructors, Standard Setters and Getters etc.
  • Need to make sure that exceptions are managed properly throughout the program; especially NullPointerException, ClassNotFoundException, NumberFormatExceptionandSQLException etc.
  • All images, tables, and sample data given in this document are just for reference purpose only; you need to provide your own implementations. It is not required to be the same.

 

 

Good Luck


+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)


Views: 592

Attachments:

Replies to This Discussion

anybody upload the solution. ......................

RSS

Looking For Something? Search Here

HELP SUPPORT

This is a member-supported website. Your contribution is greatly appreciated!

© 2020   Created by +M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service

.