bill priview genaration code in java swing
#1

I wanted to make a store management system using java Swing. Almost all done like employee addition, company addition, product addition etc, I am stuck with the bill portion. I am keeping another table for storing the bill details and now what i needed is to retrieve the data from bill table and print it. Could you please help me how to generate bill from DB and print it.
Reply
#2
bill priview genaration code in java swing

import java.util.*;
class ebill
{
public static void main (String args[])
{
customerdata ob = new customerdata();
ob.Getdata();
ob.Calc();
ob.Display();

}
}

class customerdata
{
Scanner in = new Scanner (System.in);
Scanner ins = new Scanner (System.in);
String cname,fname;
int bn;
double units,tbill;

void Getdata()
{
System.out.print ("\n\t Enter block number = ");
bn = in.nextInt();
System.out.print ("\n\t Enter flate name = ");
fname = ins.nextLine();
System.out.print ("\n\t Enter customer name = ");
cname = ins.nextLine();
System.out.print ("\n\t Enter total consumed units = ");
units = in.nextDouble();
}

void Calc()
{
if (units<100)
tbill=0.40*units;
else if (units>100 && units<300)
tbill=0.50*units;
else
tbill=0.60*units;
if (tbill>150)
tbill+=tbill*0.15;
}

void Display()
{
System.out.println ("\n\t Customer name = "+cname);
System.out.println ("\n\t Total units = "+units);
System.out.println ("\n\t Total bill = RM "+tbill);
}
}
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: simple bill generation code using swing, java code for bill generation, create an employee pay bill calculation using various swing controls, bill generator source code in java swing, third genaration ssd seminar, power genaration by pelamis ppt pdf, bill generator in java code,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  simple java rmi chat application source code 2 18,986 20-07-2018, 12:08 PM
Last Post: Guest
  free download source code for online movie ticket booking in java 2 18,495 15-08-2017, 03:21 PM
Last Post: Morshed
  source code for rsa encryption and decryption in java 2 7,930 29-05-2017, 04:21 PM
Last Post: Meghna Jadhav
  source code for task scheduling using genetic algorithm using java 2 8,447 11-04-2017, 08:31 PM
Last Post: Guest
Bug vodafone post paid bill sample 2 1,000 03-10-2016, 07:07 PM
Last Post: [email protected]
  source code for suspicious email detection in java Parvesh.2595 2 1,023 23-08-2016, 04:05 PM
Last Post: seminar report asees
  ticket reservation java source code android 3 926 23-08-2016, 10:58 AM
Last Post: Guest
  telenor bill hack 3 0 3 0 3 7 3 6 2 802 23-07-2016, 03:31 PM
Last Post: dhanabhagya
  java netbeans source code employee management system 2 892 21-07-2016, 02:30 PM
Last Post: jaseela123d
  queue management system in hospital in java with source code 2 886 14-07-2016, 02:39 PM
Last Post: seminar report asees

Forum Jump: