Program For Shopping Mall Management

Nov 4, 2014

My program is basically on mall management ,here have to give details to customer of mall on a screen so, they can easily get that particular shop exact location . Infact they can get offer details that is given by that shop . Customer can even get alternate options of shop for their demand for eg: if someone want sports wear then he/she may get many options of shop like PUMA,NIKE,REEBOK etc.

View Replies


ADVERTISEMENT

GUI And Multiple Run Management

Nov 19, 2014

I am trying to launch a GUI to my agent-based model (Repast and Eclipse) so that being able to run the model for many times. I am going to produce input parameters based on different distributions for different runs from GUI. Usually we should use batch file for different runs. However, I want to use GUI for this reason because I have GUI that can take care for one run but not for many runs.

View Replies View Related

Time Management System

Oct 27, 2014

I'm in the middle of building A time management system for myself.I'm currently using JodaTime for timing in java. I just can't figure out who to save my data like, the starttime, stoptime and day time.

public void save() throws SQLException {
String checkSql = "select count(*) as count from Time where id=?";
PreparedStatement checkStmt = con.prepareStatement(checkSql);
String insertSql = "insert into Time (id, day, starttime, stoptime, overtime, exception, hours) values (?, ?, ?, ?, ?, ?, ?)";
PreparedStatement insertStatement = con.prepareStatement(insertSql);

String updateSql = "update Time set day=?, starttime=?, stoptime=?, overtime=?, exception=?, hours=? where id=?";
PreparedStatement updateStatement = con.prepareStatement(updateSql);

[code]....

View Replies View Related

Thread And Clock Management

Dec 19, 2014

I have objects (baddies in a game) that have individual clocks/counters assigned to them (when I make an object, I fill an integer based array list with a new digit entry at a value of one) that all happens in threads. then in another thread, I am checking the whole list of clocks, to see if any are equal to a wanted value , then I am taking an action and reseting the clock at that point on the array list.

now, the problem is:even though my code says " yes, I've taken that action because the value of array position x was >= specified value and I will now reset the clock" it doesn't reset the clock. Here is what it looks like

*these are excerpts taken from a really big program, however they should stand on their own as they are individual classes

Java Code:

public class levelclock extends Thread {
public void run() {
while (Run2 == true) {
if (Run == false) {
try {
Thread.sleep(100);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();

[code]....

(Attached, just open up the zip and read the .txt)

View Replies View Related

Custom Input Management Class - No Output

Aug 25, 2014

My input class

package core;
import java.util.ArrayList;
import org.lwjgl.input.Keyboard;
public class Input{
public static final int num_key = 78;
private static ArrayList<Integer> currrentkeys = new ArrayList<Integer>();
private static ArrayList<Integer> downkeys= new ArrayList<Integer>();
private static ArrayList<Integer> upkeys = new ArrayList<Integer>();

[Code] ....

View Replies View Related

Modern Gems - Two Dimensional Tile-management Game

Feb 20, 2014

package modern.gems;
public class Board {
// will need to add params where required ...
private Gem[][] gems;
private int[][] array;
private int rows;
private int cols;

[Code] ....

View Replies View Related

Hospital Management System - Generating Report On Daily Basis

Sep 30, 2014

Hospital management system in java. I have designed Hospital, Doctor, Patient, Appointment classes. I am able to add doctor list and patient list and show the doctor list and patient list. How to take new appointment from a patient and assign it to a particular doctor and how to generate a report for inpatient and outpatient on a daily basis.

View Replies View Related

Servlets :: Large File Upload From Client To Content Management System

Sep 3, 2009

I have a requirement where a large file (100 -200MB) is uploaded from the client to a content management system. I am using a servlet with Apache Commons File Upload API. Apache FileUpload has 2 ways of handling files,

1) Non-Streaming
2) Streaming

Currently I use the Non-Streaming approach where the servlet stores the file in a temp location and upload the same into the content management system - This is taking lot of time so I am trying to implement Streaming API.

Content Management API supports streaming in 2 methods,

a) SetContent - Takes the file's ByteArrayOutputStream as input -> This gives OutOfMemoryException because the file being large
b) AppendContent - Takes the file's ByteArrayOutputStream as input -> This method can be called multiple times to upload the large file but I dont know how to do this. The Apache File Upload gives InputStream of the file and I need to split that into chuncks and append into the content management system.

How to convert InputStream to 4KB ByteArrayOutputStream so that I can use the AppendContent method in content management API?

View Replies View Related

Code For Shopping List

Dec 2, 2014

Im new to java, the program works but I have a feeling its not the right way to do it.

public class ShoppingItem {
private String ItemName;
private double ItemPrice;
private int ItemQty;
public ShoppingItem()
{
ItemName = "Fruit";
ItemPrice = 100;
ItemQty = 1;

[code]....

View Replies View Related

Online Shopping Price Comparison

Jan 20, 2015

I want the code for comparing the price of product on different online shopping site ...

View Replies View Related

Servlets :: Shopping Cart - Not Add More Than One Item

Dec 30, 2014

I have following servlet to add items into cart -

import java.io.*;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import javax.servlet.RequestDispatcher;

[Code]...

One item gets added to the cart successfully. When adding the second item it gives a Null Pointer Exception at line 53

cart.add(item);

View Replies View Related

Shopping Cart Using Array Of Items

Nov 5, 2014

I am working on a project. It is a shopping cart java program that should be setup with an array size of 5 and increased at increments of 3 if you go over 5 items. When I go over 5 items in increases however it changes the item names to null. See output below.

Here is the actual assignment:

In this exercise you will complete a class that implements a shopping cart as an array of items. The file Item.java contains the definition of a class named Item that models an item one would purchase. An item has a name, price, and quantity (the quantity purchased). The file ShoppingCart.java implements the shopping cart as an array of Item objects.

1.Complete the ShoppingCart class by doing the following:

a.Declare an instance variable cart to be an array of Items and instantiate cart in the constructor to be an array holding 5 Items.
b.Fill in the code for the increaseSize method. Your code should be similar to that in the CDCollection class handout but instead of doubling the size just increase it by 3 elements.
c.Fill in the code for the addToCart method. This method should add the item to the cart and update the totalPrice instance variable (note this variable takes into account the quantity).
d. Add a getTotalPrice() method to return the totalPrice.
e..Compile your class.

2.Write a program that simulates shopping. The program should have a loop that continues as long as the user wants to shop. Each time through the loop read in the name, price, and quantity of the item the user wants to add to the cart. After adding an item to the cart, the cart contents should be printed along with a subtotal. After the loop, print a "Please pay ..." message with the total price of the items in the cart. Compile and run this class.

OUTPUT

Enter the name of the item: Apples
Enter the unit price: .5
Enter the quantity: 1

Shopping Cart

ItemUnit PriceQuantityTotal
Apples$0.501$0.50
Total Price: $0.50
Continue shoppping (y/n)?
y
Enter the name of the item: Oranges
Enter the unit price: .5
Enter the quantity: 1

[Code] .....

View Replies View Related

JSP :: Shopping Cart - Custom Tag And Image

Jan 4, 2015

I am developing shopping cart in which I am storing image in database and retrieving.

When I select any product category from menu. example, I selected Computer then all list of product related to computer will be return i.e productName, Price and image, By using JSON.

this is my json response and output in comment.

success : function(data) {
if (data.length != 0) {
var d = eval(data);
$("#productList").html("");
for ( var key in d) {

[Code] ....

Alternatively I created custom tag to resolve this.Custom tag is working fine in jsp but in java script it saying error raised Unterminated custom tag. I think I used this custom tag in javascript but i am not sure about this error,

custom tag code for image :
imgByte = product.getImage().getBytes(1, (int) product.getImage().length());
String encodeimage = new String(Base64.encodeBase64(imgByte));
out.println("<tr><td><img src="data:image/jpeg;base64," +encodeimage + ""/><tr> <td>");

MY Question
1 - How can I use Custom tag in javascript ? Or
2 - How can we extract image from json object, like I did in custom tag .

View Replies View Related

What Classes Can Be Used For Shopping Checkout System

Mar 15, 2015

I'm currently trying to build a project for a mock checkout system. Basically it has to allow for users to browse through a list of items and add and remove products to the shopping cart as well as keep track of everything, dynamically updating the total price of the items in the checkout. In addition I also have to allow for the use of multiple checkouts. I have the main gui built but just trying to ascertain the best manner in which to build everything behind it.

View Replies View Related

Servlets :: How To Design A Shopping Website

Nov 23, 2014

I am working on a Project of Ecommerce Shopping WebSite in Java.

First I Decided to use Servets,JSP,Spring,hibernate etc.. from Scratch to design its Layouts and Functionality.

But After Reading this Thread [URL]...

I Found that there are already some Ecommerece Solution that are availabale in Java Like Magento.

Is it worth To use these Ecommerce Solution for Development Purpose of Premium Purpose.

I read that some of them are Open Source.

If a ShoppingCart Solution is OpenSource then Can We Use that to develop and Distribute for Premium Purpose?

View Replies View Related

Servlets :: How To Remove Item From Shopping Cart

Feb 20, 2014

I created a website using jsp and servlet. I made a shopping cart and got the items to display. But how can i remove the items from the cart? Next to each item is a remove button. When that is pressed the item selected needs to be removed and cart needs to refresh.

Here is the code to display the cart:

<table width='700' border='2'>
<tr>
<td>Qty</td>
<td>Name</td>
<td>Price</td>

[Code] .....

View Replies View Related

JSP :: Shopping Cart - Calculate Total Price

Sep 21, 2014

I am making a shopping cart web, but some problems I meet about how to calculate the total price

I use ajax in product list web and if I choose one product , it will send the Id that I read from MySql to servlet and use session to save it . and I click the button jump to the cart, the page cart.jsp will read information from session ,and find product information from mysql by id , now my question is where I calculate the total price, servlet or jsp?

View Replies View Related

Servlets :: Architecture Design For Shopping Database

Apr 2, 2015

I'm working on a consulting training project to create a eCommerce online shopping application. Nothing big, just something functional and simple. That's why I want to structure it with the easiest maintainability possible. I've already ironed out the the database entities and how they'll relate to one another and even managed to establish connection to the database from my java application class. NOW I need to configure a user session on the web.xml, from what I've learned so far in my consulting, I can easily use jsp and servlets to have httpsession objects receive and send the information needed to and from the database, but the question is, how many do I need for a client's session?

Would maintainability be easier if I divide each entity's class actions to different servlets(a customer servlet, order servlet, product servlet, etc...), or can a single servlet handle an entire session without any complication?

View Replies View Related

Servlets :: Shopping Cart Session Is Not Working Properly

Jan 4, 2015

I am adding my shopping cart in session like bellow in servlet

HttpSession session = request.getSession();
session.setMaxInactiveInterval(60*30); // 30 minutes
if (session.getAttribute("cart") == null){
session.setAttribute("cart", new ShoppingCart());
}
cart = session.getAttribute("cart");

I seems if more than one person accesses it from server, if they items in the shopping cart, all the product is added to a single session. I mean if i added 4 items first and other person adds 2 items, second person sees 6 products in his cart. Where am I going wrong?

View Replies View Related

Java ArrayList - Printing Shopping Cart Receipts Project

Oct 26, 2014

I'm new to the concept of ArrayList and I want to solve this problem in my code.

My main problem: I don't know how to sort itemA and itemB to appear only once then It will just add the total prices together.

This is the behavior of my code:

C:Documents and SettingsDrewDesktop>java ReceiptCode
Enter Company Name
ABC Co
Enter STREET ADDRESS
123 Main Street
Enter CITY, STATE, ZIP

[Code] ....

I don't know how to sort itemA and itemB to appear only once then It will just add the total prices together. Here is my sourcecode:

ReceiptCode.java
import java.util.Scanner;
import java.util.Date;
import java.text.DateFormat;
import java.text.SimpleDateFormat;

[Code] ....

View Replies View Related

Servlets :: Shopping Cart - Show Text Based On Which Page A User Is Coming From

May 30, 2014

I am making a shopping cart app in JSP and servlets to bring it all together. Finally.

I have a registration servlet (c1), a registration form jsp (c2), a login jsp (c3). c1 checks if a username is in the database or not.

If the username is not there, then register the user and send them to c3. I want c3 to display a "registration successful" message if a user has just registered successfully and is coming from c1. ELSE, take the user back to c2 with a message which tells them to choose a different username or password etc.

How do I implement the logic of showing a message depending on where a user is coming from ? The servlets and jsps are ready and I only need to add this logic for a custom message. Of course, I could make a JSP for Registration Successful and one for Registration Failure. But, that seems to be unnecessary.

View Replies View Related

JSP :: Display Product Details From Database In A Gridview Format For Online Shopping System

Apr 12, 2015

I want to display product details such as product image, name, price in a one cell of a table tag on jsp page. There should be multiple rows and 3 cells per row in the required output.i have written the following code:

<form action="displayServlet" method="get">

<table >
<tr>
<%
statement4 = connection3.createStatement();
rs4 = statement4.executeQuery("SELECT * FROM product");

[code]....

This code displays all cells in only one row. I used colspan but its not working...I have attached the snapshot of above code output and required output

View Replies View Related

Create Little Program Which Enter Number / Program Says Triangle Exist Or Not

Mar 16, 2014

i want create little program which enter the number, ant program says triangle exist or not. So code :

import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

[code]...

So when i put first num like 1, next num like 2 and next num like 100 , program says Triangle exist.

View Replies View Related

Program To Open Excel Sheet From Java Program

Apr 16, 2014

Have written a program to open Excel sheet from java program.Below line works fine.

Process p = Runtime.getRuntime().exec(new String[]{""C:Program Files (x86)Microsoft OfficeOffice12Excel.EXE"","C:UsersRASHPA~ 1.ORAAppDataLocalTempExport_xl420314062726 9379706.xls"});

But below code gives error i.e. Executable name has embedded quote, split the arguments

String path = "C:Program Files (x86)Microsoft OfficeOffice12Excel.EXE";
String file = "C:UsersRASHPA~1.ORAAppDataLocalTempEx port_xl4203140627269379706.xls";

Process p = Runtime.getRuntime().exec(new String[]{"""+path+""" + ","+file});

I am using java 1.6.

View Replies View Related

Program That Links Several GUI As Menu Based Program

Dec 17, 2014

In a project for school. I have a program that links several GUI's as a menu based program. What I am trying to accomplish is when one of the previous GUI's is closed that it doesn't terminate the entire program. There is a lot of classes in the entire project so I'd prefer not to paste all the code here, but if it is necessary I will do so.

View Replies View Related

Creating A Program That Will Compile And Run Another Java Program

Feb 20, 2014

I'm creating a program that will compile and run another java program:Lets say I have a program in directory

D:HelloWorldsrc
and compiled program will be in
D:HelloWorldin
inside src and bin is a folder hello (that's a package)

package hello;
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World");
System.out.println("Hello World");
}
}

This program will be run by another program (that's the program that I am creating).Here is the code of my program:

package runnercompiler;
import java.io.IOException;
import java.io.InputStream;
import java.util.logging.Level;
import java.util.logging.Logger;
public final class RunnerCompiler {
 
[code]....

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved