Download as pdf or txt
Download as pdf or txt
You are on page 1of 26

JAVA PROGRAMING MICRO PROJECT

Karmaveer shankrao kale education society’s

GAUTAM POLYTECNIC INSTITUTE


GAUTAMNAGAR

A PROJECT REPORT ON

“ Shopping Cart ”
Submitted to
MSBTE
In Partial Fulfilment of the Requirement for the Award of

DEPLOMA IN
COMPUTER ENGINEERING
Submitted By
Shaikh Ayan Dilawar (2016690053)
Shinde Sudershan Rajendra (2016690066)
Sonwane Shriram Radesham (2116690052)
Dudhate Dnyneshwar Bhagawat (2116690042)

UNDER THE GUIDANCE OF


DEPARTMENT OF COMPUTER ENGINEERING

Gautam Polytechnic institute, Kolpewadi

2021-2022
1|P age
JAVA PROGRAMING MICRO PROJECT

Karmaveer shankrao kale education society’s

GAUTAM POLYTECNIC INSTITUTE


GAUTAMNAGAR

CERTIFICATE
THIS IS CERTIFY THAT THE PROJECT ENTITLED

Is a record of benifide work carried out by them, in the


partial fulfilment of the requirement for the award of
Diploma of Engineering (Computer Engineering) at
GAUTAM POLYTECNIC INSTITUDE, GAUTAMNAGAR
under the University of M S B T E .
This work is done during year 2021-2022, under our
guidance.
Date: / /

(Prof. Archana Gadakh)

HOD, Computer Department

(Ms.Ohel V.R)
Project Guide
(Prof.Bharti S.M)
Principal
2|P age
JAVA PROGRAMING MICRO PROJECT

INDEX

Sr . Topic name Page no


no

1.0 Rationale 04

2.0 Aim of microcproject 05

3.0 course outcome integrad 06

4.0 Literature review 07

5.0 Actual methodoly followed 10

6.0 Actual resources 11

7.0 Code and output of micro project 13

8.0 Skill developed /lerning out of this project 25

9.0 Conclusion 26

3|P age
JAVA PROGRAMING MICRO PROJECT

Micro- Project Report:

Title of Project: -shopping cart

1.0 Rationale:-
1. A shopping cart is a piece of software that acts as an
online store's catalog and
ordering process.
2. shopping cart is the interface between a company's
Web site.
3. Its deeper infrastructure, allowing consumers to
select merchandise; review what they have selected;
make necessary modifications or additions; and
purchase the merchandise
4. Shopping carts can be sold as independent pieces of
software so companies can integrate them into their
own unique online solution or they can be offered
as a feature from a service that will create and host
a company's e-commerce website.

4|P age
JAVA PROGRAMING MICRO PROJECT

2.0 Aim of Micro Project:-

1. The “Shopping Cart” has been developed with


java programming using jdk app.
2. This also minimizes paperwork and manual tasks.
3. Shopping cart helps us in this project for shopping
the things in easy way from any place.

5|P age
JAVA PROGRAMING MICRO PROJECT

3.0 Course Outcomes Integrated:-

1. Use jdk software.


2. Implement exception handling.
3. Develop programs using Object Oriented
methodology in Java.

6|P age
JAVA PROGRAMING MICRO PROJECT

4.0 Litrature review:-

1. These applications typically provide a means of


capturing a client's payment information, but in the
case of a credit card they rely on the software
module of the secure gateway provider, in
conjunction with the secure payment gateway, in
order to conduct secure credit card transactions
online.
2. Some setup must be done in the HTML code of
the website, and the shopping cart software must be
installed on the server which hosts the site, or on
the secure server which accepts sensitive ordering
information.
3. E-shopping carts are usually implemented
using HTTP cookies or query strings. In most server
based implementations however, data related to the
shopping cart is kept in the session object and is
accessed and manipulated on the fly, as the user
selects different items from the cart.
4. Later at the process of finalizing the transaction, the
information is accessed and an order is generated
against the selected item thus clearing the shopping
cart.
5. Although the most simple shopping carts strictly
allow for an item to be added to a basket to start a
checkout process (e.g., the free PayPal shopping
cart), most shopping cart software provides
additional features that an Internet merchant uses to
7|P age
JAVA PROGRAMING MICRO PROJECT

fully manage an online store. Data (products,


categories, discounts, orders, customers, etc.) is
normally stored in a database and accessed in real
time by the software.
6. Shopping cart software can be generally categorized
into three types of E-commerce software.
➢ Open source software:
1. The software is released under an open source
licence and is very often free of charge.
2. The merchant has to host the software with a Web
hosting service.
3. It allows users to access and modify the source code
of the entire online store.
➢ Licensed software:
1. The software is downloaded and then installed on
a Webserver.
2. This is most often associated with a one-time fee, the
main advantages of this option are that the merchant
owns a license and therefore can host it on any web
server that meets the server requirements.

8|P age
JAVA PROGRAMING MICRO PROJECT

➢ Hosted service:
1. The software is never downloaded, but rather is
provided by a hosted service provider and is
generally paid for on a monthly or annual basis; also
known as the application service provider (ASP)
software model.
2. Some of these services also charge a percentage of
sales in addition to the monthly fee. This model
often has predefined templates that a user can
choose from to customize their look and feel.
3. Predefined templates limit how much users can
modify or customize the software with the
advantage of having the vendor continuously keep
the software up to date for security patches as well
as adding new features.

9|P age
JAVA PROGRAMING MICRO PROJECT

5.0Actual Methodology followed:

stepwise description:
1. We collected information from various sources
available.
2. Thus execution of project was made.

10 | P a g e
JAVA PROGRAMING MICRO PROJECT

6.0 Actual Resources Used:-

Sr.no Name of Specifications Qty Remarks


resources
1 Operating Windows 10 01
system
2 Visual 2017 01
Studio
3 Microsoft 2019 01
word

11 | P a g e
JAVA PROGRAMING MICRO PROJECT

7.0 Code and Outputs of the Micro-Projects:-

import java.util.Scanner;
import java.util.Vector;
public class ShoppingCart
{
Vector v1 = new Vector();
Vector v2= new Vector();
Vector v3 = new Vector();
Vector v4 = new Vector();
String iname;
float icost, total;
int quantity;
int i = 0;
int pos;

public void choices()


{
int choice;
Scanner s1=new Scanner(System.in);
12 | P a g e
JAVA PROGRAMING MICRO PROJECT

System.out.println("\n\n\n----------------------
ENTER YOUR CHOICE---------------------\n\n\n");
System.out.println("What Do You Want To
Do?");
System.out.println("1.Add To Cart");
System.out.println("2.Remove From Cart");
System.out.println("3.Show Cart");
System.out.println("4.Checkout");
System.out.println("5.Exit");

choice=s1.nextInt();
switch (choice) {
case 1:
add();
break;
case 2:

if(i>0)
{
remove();
}
13 | P a g e
JAVA PROGRAMING MICRO PROJECT

else
{
System.out.println("\n\n\n------------------
Aughs!!Your Cart Is Empty-----------------");
choices();
}
break;

case 3:
if(i>0)
{
show();
}
else
{
System.out.println("\n\n\n--------------
----Aughs!!Your Cart Is Empty-----------------");
choices();
}

break;
case 4:
14 | P a g e
JAVA PROGRAMING MICRO PROJECT

if(i>0)
{
cartTotal();
}
else
{
System.out.println("\n\n\n--------------
-------You Bought Nothing---------------------");
choices();
}

break;

case 5:
System.out.println("Thank You!!!! Visit
Once Again$$!!");
break;
default:
System.out.println("Oops!! Incorrect
Choice!! Try Again");
break;
}
15 | P a g e
JAVA PROGRAMING MICRO PROJECT

/*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$$$$$$$$$$$$$$$$$$$$$$$$$$ADDING THE
ITEM TO CART $$$$$$$$$$$$$$$$$$$$$$$$$$$$

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*/

public void add()


{ System.out.println("\n\n\n-------------------------
---ADD-----------------------------\n\n\n");

Scanner s = new Scanner(System.in);


System.out.println("Enter the Name Of Item:");
iname=s.next();
v1.add(i,iname);
System.out.println("Enter the Price Of This Item:");

icost=s.nextInt();
v2.add(i,icost);

16 | P a g e
JAVA PROGRAMING MICRO PROJECT

System.out.println("Enter the Quantiy Of This


Item:");
quantity=s.nextInt();
v3.add(i,quantity);
total = quantity*icost;
v4.add(i,total);
i++;
System.out.println("\n\n\n---------------------------
ADDED----------------------------\n");

choices();
}

/*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$$$$$$$$$$$$$$$$$$$$$$$$$$REMOVE THE
ITEM FROM CART $$$$$$$$$$$$$$$$$$$$$$$$$$

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*/

public void remove()


{
17 | P a g e
JAVA PROGRAMING MICRO PROJECT

System.out.println("\n\n\n-------------------------
--REMOVE---------------------------\n\n\n");

System.out.println("What is the position of the


element you want to remove");
Scanner s2 =new Scanner(System.in);
pos=s2.nextInt();
System.out.println("Removed Item
is:"+v1.elementAt(pos));
v1.remove(pos);
v2.remove(pos);
v3.remove(pos);
v4.remove(pos);
i--;
System.out.println("\n\n\n-------------------------
--REMOVED--------------------------\n\n\n");

choices();
}

/*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

18 | P a g e
JAVA PROGRAMING MICRO PROJECT

$$$$$$$$$$$$$$$$$$$$$$$$$$$SHOWING
THE ITEM IN CART
$$$$$$$$$$$$$$$$$$$$$$$$$$$

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*/

public void show()


{
System.out.println("\n\n\n||*******************
*************************************||");
System.out.println("||-----------------------
YOUR CART------------------------||");

System.out.println("||************************
********************************||\n");
for(int j = 0;j<i;j++)
{
System.out.println("ITEM:
"+v1.elementAt(j));
System.out.println("COST:
"+v2.elementAt(j)+".Rs");
System.out.println("QUANTITY:
"+v3.elementAt(j));

19 | P a g e
JAVA PROGRAMING MICRO PROJECT

System.out.println("---------------------
--------");
System.out.println("TOTAL:
"+v4.elementAt(j)+".Rs");
System.out.println("---------------------
---------");
}

choices();

/*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$$$$$$$$$$$$$$$$$$$$$$$$$$SHOWING
THE ITEM IN CART
$$$$$$$$$$$$$$$$$$$$$$$$$$$

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*/

void cartTotal()
{

20 | P a g e
JAVA PROGRAMING MICRO PROJECT

float cartt=0;

for(int j = 0;j<i;j++)
{
cartt=(float) v4.elementAt(j)+cartt;

System.out.println("||************************
********************************||");

System.out.println("||************************
********************************||");
System.out.println("|| You Have Done
Shopping Of:"+cartt+".Rs ||");
System.out.println("|| Pay The Total To
Our Programmer and Visit us Again || ");

System.out.println("||************************
********************************||");

System.out.println("||************************
********************************||");

21 | P a g e
JAVA PROGRAMING MICRO PROJECT

public static void main(String[] args) {

System.out.println("||************************
********************************||");

System.out.println("||************************
********************************||");

System.out.println("||************************
********************************||");
System.out.println("||
||");
System.out.println("|| SHOP
HERE ||");
System.out.println("||
||");

System.out.println("||************************
********************************||");

22 | P a g e
JAVA PROGRAMING MICRO PROJECT

System.out.println("||************************
********************************||");

System.out.println("||************************
********************************||");

ShoppingCart obj = new ShoppingCart();

obj.choices();
}
}

23 | P a g e
JAVA PROGRAMING MICRO PROJECT

24 | P a g e
JAVA PROGRAMING MICRO PROJECT

8.0 Skill developed/ Learning out of this Micro-


Project:-

1. We have learn about java programming.


2. It manages all the information about total available,
adding, removing the cart.
3. The purpose of the project is to build an application
program to reduce the manual.

25 | P a g e
JAVA PROGRAMING MICRO PROJECT

9.0 Conclusion:-

1. This project has a real time applications this project


is used to manage all the information about shopping
cart online shopping.
2. This project is especially useful for people for
getting all required things for their.

26 | P a g e

You might also like