Share:

Dear Students! Please share your Assignment files as you recieve in your lms so it can be discussed/solved timely. Share assignments files by click on UPLOAD button.

CS506 Assignment 2 Solution Fall 2019  

  RSS

talhaofficial0
(@talhaofficial0)
Moderator
Joined: 5 months ago
Posts: 15
28/11/2019 8:27 am  

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. bc000000000.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 [email protected]

Lectures Covered: This assignment covers Lecture # 1-17

 

GOOD LUCK

 

 

 

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:

Product.java

Cart.java

DatabaseHelper.java (should contain all database related code)

MainClass.java (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:

#

Item

Price ($)

1

Orange

2.0

2

Grapes

2.5

3

Banana

1.5

4

Mango

3.0

 

Tab. 1: Sample Products Data

 

#

No of Items

Charges

1

0

$0

2

1 to 5

$0.5

3

6 to 10

$1.0

4

11 to 15

$1.5

5

16 to 20

$2.0

6

21 to 25

$2.5

7

26 to 30

$3.0

8

31 to 35

$3.5

9

More than 35

$4.0

 

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.

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

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

 

 

 

 

Good Luck


umar1.pk liked
Quote
danish889
(@danish889)
New Member
Joined: 3 weeks ago
Posts: 4
02/12/2019 9:17 pm  

Waiting for solution file for cs506 Assignment 2, zip file.

 


ReplyQuote
admin
(@admin)
Admin
Joined: 1 year ago
Posts: 1361
02/12/2019 9:40 pm  

@danish889

 

ok, but it's much better if Students having same subject start discussing this Assignment quiz by sharing ideas/knowledge, Simply by adding a reply here So assignment can be solved step by step this will also clears your concepts 🙂

(we will try to add solution idea before last date)

How is this website, please share your feedback through this link: https://forms.gle/mZ5rsd995RxU2gEZ7


ReplyQuote
shaheen
(@shaheen)
New Member
Joined: 1 week ago
Posts: 4
03/12/2019 3:31 pm  

@admin

Sir kindly upload the correct solution of CS506 Assignment No.2 2019. Today is the last date. Thanks 


ReplyQuote
numantanveer
(@numantanveer)
New Member
Joined: 6 days ago
Posts: 2
03/12/2019 4:57 pm  

kindly give some idea of solution 


ReplyQuote
numantanveer
(@numantanveer)
New Member
Joined: 6 days ago
Posts: 2
03/12/2019 5:01 pm  

@admin

kindly provide some idea for this assignment  


ReplyQuote
admin
(@admin)
Admin
Joined: 1 year ago
Posts: 1361
03/12/2019 7:17 pm  

CS506 Assignment 2 Solution & Discussion Fall 2019


@talhaofficial0 @danish889 @numantanveer @shaheen

check this video to get idea!!!

https://youtu.be/8wgrscoZMvA

How is this website, please share your feedback through this link: https://forms.gle/mZ5rsd995RxU2gEZ7


ReplyQuote
shaheen
(@shaheen)
New Member
Joined: 1 week ago
Posts: 4
03/12/2019 7:41 pm  

@admin

The video owner doesn't show exact. There are many cuts in this video. Kindly give us zip file with all files as you know few hours left. Kindly provide the solution as you also do in the previous assignments. Thanks 


ReplyQuote
danish889
(@danish889)
New Member
Joined: 3 weeks ago
Posts: 4
03/12/2019 11:51 pm  

@admin

Sir, this solution is not completed, kindly provide us Zip file. Thanks in advance. Today is extended data!


ReplyQuote
danish889
(@danish889)
New Member
Joined: 3 weeks ago
Posts: 4
04/12/2019 5:07 pm  

Hello Sir,
We are still waiting for the solution file for CS506 Assignment 2. Today is extended date. Thanks in Advance!


ReplyQuote
admin
(@admin)
Admin
Joined: 1 year ago
Posts: 1361
04/12/2019 7:21 pm  

Dear all who are looking for CS506 solution, please start discussion here by sharing your idea/knowledge or ask in steps to solve assignment, time is very short! share what you have/know or ask where you stuck, help each other surely you can do that. Best of Luck!

How is this website, please share your feedback through this link: https://forms.gle/mZ5rsd995RxU2gEZ7


ReplyQuote
admin
(@admin)
Admin
Joined: 1 year ago
Posts: 1361
04/12/2019 10:01 pm  

 

Solution idea file.... need to verify yourself for any mistake.

extract it to get .rar file

This post was modified 5 days ago 3 times by admin

How is this website, please share your feedback through this link: https://forms.gle/mZ5rsd995RxU2gEZ7


ReplyQuote
Share:

Please Login or Register