Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.

Due Date : Dec 03, 2019

Total Marks : 20

Views: 11042


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. (For Assignments, GDBs & Online Quizzes Solution) (For Past Papers, Solved MCQs, Short Notes & More)

Click Here to Search (Looking For something at

Click Here to Join (Our facebook study Group)

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, database file and builds etc.). After finalizing, compress it with Zip or RAR format, save with your own Student ID (e.g. 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

Lectures Covered: This assignment covers Lecture # 1-17






Problem Statement:

You are required to write a Java program, named ShoppingCart, for a typical online shopping system. In which a customer can add and remove items to the shopping cart. The program will calculate the total bill as the items are added/removed to/from shopping cart and will display the amount via user friendly Interface on real time basis. Further, all orders will be saved in a backend database using MS Access so that the administrator could process the orders properly.


Detailed Description:

At start, your program should read Products Data from MS Access database file (sample data is given below) and display a GUI (i.e. Graphical User Interface) which should contain options for selecting quantity of products, sample is given below;

Fig. 1: Shopping Cart GUI


Here, the customer can select the quantity (i.e. 0 to 10) for available products by clicking on add (+) or remove (–) buttons; the cart should be updated on each action and correct amount after calculating the number of items, subtotal, shipping charges (shipping charges are given below) and grand total should be displayed.

When user clicks on "Place Order" then the program should check whether the cart contains any item or not. If cart is empty then a message "Cart is empty!" should be displayed.  Otherwise, order details will be saved to MS Access database file and interface will be updated with initial values (i.e. zero quantity for each item and zero in amount fields etc.) as well.

Further, cross icon at top right corner of the interface should terminate the program and show the developer information (i.e. Student Id and name) via message dialog.


Fig. 2: Developer Info

Required Stuff:

Java Classes: (should contain all database related code) (should contain GUI code)


Database file:

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


Note: need to put database file in assets folder in NetBeans project directory; as shown below;


Fig. 3: Folder "assets" in NetBeans project directory

Sample Data:



Price ($)














Tab. 1: Sample Products Data



No of Items






1 to 5



6 to 10



11 to 15



16 to 20



21 to 25



26 to 30



31 to 35



More than 35



Tab. 2: Sample Shipping Charges


Tab. 3: Products Table in MS Access Database file

Tab. 4: Orders Table in MS Access Database file

Important Things to Implement:                       

  • For GUI, relevant components (e. JFrame, JPanel, JButton, JTextField and JLable etc.) from AWT and Swing packages should be used.
  • You will have to use ucanaccess driver to connect to MS Access database. In this case, you are suggested to view the following video tutorial.

  • 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 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 and SQLException.
  • 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.


koi solution share kr de


solution plz

lgta ksi ny abhi try ni kia,?

chlo m b kal e bna longa,,good luck

sir g plz agar kisi k pas solution hai to share kr dyn,,,,..

Asif, Follow the video guideline , don't depend on anyone, java ki assignment ek project hota hy complete,ur complete project koi ni share kry ga, that's it...u must try

yes thanks im trying.

Youtube sy dekh lo,, asani sy apko smj a jaye gi

is there anyone know how to make this assignment ? can anyone please help and share the solution ?  today is the last date. thank you.

Kindly upload some solution or solution guide. If some youtube video who explain this assignment with solution. to maza aa jayga.


Looking For Something? Search Below

Latest Activity

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

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