942,963 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 1705
  • Java RSS
Nov 16th, 2009
0

Cash Register Program

Expand Post »
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
Last edited by 00musdan; Nov 16th, 2009 at 7:35 pm. Reason: Help explain task
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
00musdan is offline Offline
6 posts
since Nov 2009
Nov 16th, 2009
0

Homework help

Reputation Points: 45
Solved Threads: 28
Posting Whiz in Training
Dukane is online now Online
282 posts
since Oct 2006
Nov 16th, 2009
0
Re: Cash Register Program
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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
00musdan is offline Offline
6 posts
since Nov 2009
Nov 17th, 2009
0
Re: Cash Register Program
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?
Sponsor
Featured Poster
Reputation Points: 1005
Solved Threads: 446
Nearly a Senior Poster
javaAddict is offline Offline
3,256 posts
since Dec 2007
Nov 17th, 2009
0

Well so far....

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...
Java Syntax (Toggle Plain Text)
  1. package cashregister;
  2.  
  3.  
  4. public class CashRegister {
  5. public CashRegister(double purchase, double payment){
  6. purch=purchase;
  7. pmt=payment;
  8.  
  9. double giveChange(double price, double pmt){
  10. double change = pmt-price;
  11. return pay;
  12. }
  13. }
  14.  
  15. }
Reputation Points: 10
Solved Threads: 0
Newbie Poster
00musdan is offline Offline
6 posts
since Nov 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: beginner help with java!! student class
Next Thread in Java Forum Timeline: drJava won't open!





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC