We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

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


Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

CS506 Assignment No 03 Fall 2019 Solution & Discussion Due Date: 17-01-2020

CS506 Web Design and Development Assignment 3 Solution & Discussion Fall 2019


 

Assignment No. 03
Semester: Fall 2019

CS506 – Web Design and Development

Total Marks: 20

Due Date: 17/01/2020

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

 

Uploading Instructions:

  • You are not allowed to use any other software/IDE except NetBeans IDE for this assignment development.
  • The submission must be a complete NetBeans IDE project folder (which should contain complete source code; Java files, servlet files, html files, database file, xml files and builds etc.). After finalizing, compress it with Zip or RAR format, save with your own Student ID (e.g. bs1234567890.zip) and submit it at VU-LMS within due date.
  • Your assignment should be in .zip /.rar format. Other file formats will not be accepted.
  • No assignment will be accepted through email.

 

Rules for Marking:

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

  • The assignment is submitted after due date.
  • The assignment is not submitted in .zip/.rar format.
  • The submitted assignment does not open or file is corrupted.
  • The 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.
  • The 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 # 1 - 30

GOOD LUCK

 

Problem Statement:

You are required to deploy a basic web application using Apache Tomcat Server, named ShoppingCart, for a typical online shopping system. In which a customer can add/remove items to shopping cart and proceed to place order. The program should calculate total bill and display amount via web page. Further, all orders will be saved in a backend database using MS Access so that administrator could process accordingly.

 

Detailed Description:

The program should facilitate at least one user i.e. Customer. For this purpose, you have to develop an html page (index.html) which should contain a login form, as shown in figure 1.

The customer should be able to login by using student id (must be your own student id) as username and "vu" as password.

 

Figure 1: Sample Login Page (index.html)

Now, write a Java Servlet named as LoginServlet.java that will receive submitted information from login form (i.e. index.html) and verify input values; whether entered values are correct or not. If authentication is invalid then print back a message "Invalid Username or Password".

 

Figure 2: Sample Shopping Cart (ShoppingCartServlet.java)

If customer credentials (i.e. username and password) are correct, jump to Shopping Cart Page (i.e. ShoppingCartServlet.java) which should list down all available products (i.e. products having one or more items), as shown in figure 2.

 

Here, customer can provide quantity of desired product/s and click on Check Out button. If no item is selected (i.e. no quantity is provided), then a message "Cart is empty" should be displayed.

 

On the other hand, if cart is not empty, Checkout Page (i.e. CheckOutServlet.java) should serve the customer by displaying total bill, shipping charges along with no. of products & items etc. and also provide an input field for shipping address, as shown infigure 3.

To place order, customer must provide shipping address and click on Place Order button. Before displaying message "Order has been placed successfully.”, the program must save order details (i.e. no. of items, subtotal, shipping charges, grand total, shipping address and selected products with quantity) in corresponding database tables. Further, need to maintain quantity of products in database so that customer could not see out of stock products in next shopping.

Figure 3: Sample Checkout Page (CheckOutServlet.java)

Figure 5: Folder "assets" under web directory

Button "Go Back" should take back on Shopping Cart Page. However, customer can sign out from system by pressing "Logout" button. In this case, web developer information (student id, name and email address) should be displayed via an HTML page (info.html), as shown in figure 4.

Figure 4: Sample About Us Page (info.html)

Required Stuff:

Html Pages: 

index.html

info.html

Java Servlets:

LoginServlet.java

ShoppingCartServlet.java

CheckOutServlet.java

Java Classes:

Product.java

Cart.java

Order.java

OrderDetail.java

DatabaseHelper.java (must contain all database related code)

Database file:

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

 

Shipping Charges:

Shipping Charges ($) = ((no. of Items / 5) + 1) * 0.5

Sample Data & Database Tables:

#

Name

Price

Quantity

1

Flour

$18.00

20

2

Oil

$19.00

50

3

Ghee

$10.00

0

4

Sauce

$22.00

40

5

Sugar

$21.35

35

6

Salt

$25.00

26

7

Daal

$30.00

38

8

Rice

$40.00

92

9

Pasta

$97.00

63

10

Fruits

$35.00

72

11

Dry Fruits

$31.00

70

12

Tea

$21.00

12

13

Coffee

$38.00

9

14

Milk

$10.00

10

15

Snacks

$23.25

13

16

Dessert

$15.50

22

17

Vegetables

$17.45

52

18

Chicken

$39.00

98

19

Beef

$62.50

0

20

Frozen Food

$19.20

30

21

Sea Food

$81.00

29

22

Sweet

$10.00

29

23

Cake

$21.00

0

24

Yogurt

$26.00

0

25

Pickle

$30.00

41

Tab. 1: Sample Products Data                                      

 

 

 

Tab. 2: Products Table in MS Access Database

 

  

Tab. 3: Orders Table in MS Access Database

 

Tab. 4: Order Details Table in MS Access Database

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.mp4

 

Important Things to Implement:

  • You have to provide separate pages, servlets, java files and database tables 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 project web directory along with html pages, as shown in figure 5.
  • For storing/fetching data to/from database, you will need to use proper SQL queries.
  • You can use same Product and Cart Java classes as provided in assignment # 1 & 2 and also 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, NumberFormatException and SQLException etc.
  • All images, tables and sample data, given in this document, are just for reference purpose only; you have to provide your own implementations. It is not required to be exactly the same.

 

Good Luck

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 4158

.

+ 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)

Replies to This Discussion

Please Discuss here about this assignment.Thanks

Our main purpose here discussion not just Solution

Students having same subject can start discussion here to solve assignment, GDB & Quiz and can clear their concepts until solution is provided. 

 

P.S:    Please always try to add the discussion in proper format title like “CS101 Assignment / GDB No 01 Solution & Discussion Due Date: ___________”

Then copy Questions from assignment file and paste in Discussion.

 

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

http://bit.ly/papersvu (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)

CS506 Assignment #3 Solution | Feb 2020 | CS506 | Web in java Using Servlet | Shopping cart in java

CS506 Assignment #3 Solution | Feb 2020 | CS506 | Web in java Using Servlet | Shopping cart in java

CS506 Assignment SOlution follow the link bellow

CS506 Assignment #3 Solution | Feb 2020 | CS506 | Web in java Using Servlet | Shopping cart in java

anyone have complete solution kindly share

waheedakhter0078@gmail.com

Your are charging Rs.1000 to Rs.1500 very costly., 

plzz koi help kr dy kaisy bnani assignmnt

mil k bna lety timing bta dain jis jis to ati bnani plz

kya issue aa ra ha apko ? puch skti hn ap

MNA ApacheNetBeans install ki step by step tomcat bhe kia mera web project nae ban raha mujhy nae samjh arae kya karun pahly koi plugin ka issue tha ab wo bhe download kr k activate krdi ab bhe nae ban raha

There is some problem with Apachi Tomcat server in my Project. When I click on login, The localhost port is changed to 8080 and message displayed :

Can’t reach this page
  • Make sure the web address http://localhost:8080 is correct

What could be wrong. any suggestion.

url mapping thk ki hui ha ? xml ma

RSS

Latest Activity

Mushk replied to zohaib iftikhar's discussion ...* KAHAN HAI AB TUMHARI WO MOHABBAT ITNY SAALON KI ...*???
29 minutes ago
Mushk replied to zohaib iftikhar's discussion ...*...*...* DAIKH MAIN TUJH SE KITNA PAYAR KRTA HON??? ...*...*...*
32 minutes ago
zohaib iftikhar replied to zohaib iftikhar's discussion ...* KAHAN HAI AB TUMHARI WO MOHABBAT ITNY SAALON KI ...*???
39 minutes ago
zohaib iftikhar replied to zohaib iftikhar's discussion ...*...*...* DAIKH MAIN TUJH SE KITNA PAYAR KRTA HON??? ...*...*...*
40 minutes ago
Mushk replied to zohaib iftikhar's discussion ...* KAHAN HAI AB TUMHARI WO MOHABBAT ITNY SAALON KI ...*???
1 hour ago
Mushk replied to zohaib iftikhar's discussion ...*...*...* DAIKH MAIN TUJH SE KITNA PAYAR KRTA HON??? ...*...*...*
1 hour ago
zohaib iftikhar replied to zohaib iftikhar's discussion ....* TERI PALKON PE RUKNA HAI ...*
1 hour ago
zohaib iftikhar replied to zohaib iftikhar's discussion ...*...* KAL SHAB KITAB-E-MAAZI KO JO MAIN NE KHOLA ...*...*??
1 hour ago
+ Ḱẚảḿḯ replied to Shanzay's discussion Ab hum faqt apni marzi ki baat kehty hain...
1 hour ago
zohaib iftikhar replied to zohaib iftikhar's discussion ...* KAHAN HAI AB TUMHARI WO MOHABBAT ITNY SAALON KI ...*???
1 hour ago
zohaib iftikhar replied to zohaib iftikhar's discussion ...*...*...* DAIKH MAIN TUJH SE KITNA PAYAR KRTA HON??? ...*...*...*
1 hour ago
+!CS619!+ added a discussion to the group CS401 Computer Architecture and Assembly Language Programming
2 hours ago

Today Top Members 

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

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

.