954,518 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Cash Register Program

Hello everyone i know very little of Java and need help with a project. If anyone could send some code or even help explain where i should start i would very much appreciate it. This is what the teacher gave us for the project outline on what the code should contain.
o Store
o Products (3 classes)
Attributes
• Price
• Description
• UPC
• Inventory
• Taxable(y/n)
Methods
• Purchase(qty)
o Return price
o Decrement inventory
• Getprice
• Getdescription
• Getupc
• Getquantity
• getTaxStatus
o CashRegister (Shopping Cart)

 Static TAX_RATE=1.06
 Static Class
Methods
• calculateTotal
• enter payment (dollar/cents)
• give change
o Currency
 Static variables of currency and coin
o Main Class
 Add items
 Enter purchase
 Enter payment

00musdan
Newbie Poster
6 posts since Nov 2009
Reputation Points: 10
Solved Threads: 0
 
Dukane
Posting Whiz in Training
295 posts since Oct 2006
Reputation Points: 45
Solved Threads: 29
 
Check this out

I understand that and I am very serious about this program but i do not even know where to start. If someone could help me set up this program (classes, help planning, etc.) it would be very much appreciated.

00musdan
Newbie Poster
6 posts since Nov 2009
Reputation Points: 10
Solved Threads: 0
 

Try to better explain your problem. What you posted is difficult to quite understand.
Also, don't tell me that your teacher hasn't showed how to write a single class with attributes and get/set methods. Or don't you have a book or notes with examples?

javaAddict
Nearly a Senior Poster
Team Colleague
3,329 posts since Dec 2007
Reputation Points: 1,014
Solved Threads: 448
 

SO far i have this for the cash register part of the program.... its not much and im getting a few errors and im not sure why...

package cashregister;


public class CashRegister {
    public CashRegister(double purchase, double payment){
        purch=purchase;
        pmt=payment;

        double giveChange(double price, double pmt){
            double change = pmt-price;
            return pay;
        }
    }

}
00musdan
Newbie Poster
6 posts since Nov 2009
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You