Cash Register Program

Reply

Join Date: Nov 2009
Posts: 3
Reputation: 00musdan is an unknown quantity at this point 
Solved Threads: 0
00musdan 00musdan is offline Offline
Newbie Poster

Cash Register Program

 
0
  #1
Nov 16th, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 265
Reputation: Dukane is an unknown quantity at this point 
Solved Threads: 22
Dukane's Avatar
Dukane Dukane is offline Offline
Posting Whiz in Training

Homework help

 
0
  #2
Nov 16th, 2009
It is very important to read this: http://www.catb.org/~esr/faqs/smart-questions.html
Reply With Quote Quick reply to this message  
Join Date: Nov 2009
Posts: 3
Reputation: 00musdan is an unknown quantity at this point 
Solved Threads: 0
00musdan 00musdan is offline Offline
Newbie Poster
 
0
  #3
Nov 16th, 2009
Originally Posted by Dukane View Post
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.
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 1,938
Reputation: javaAddict is a name known to all javaAddict is a name known to all javaAddict is a name known to all javaAddict is a name known to all javaAddict is a name known to all javaAddict is a name known to all 
Solved Threads: 252
Featured Poster
javaAddict's Avatar
javaAddict javaAddict is offline Offline
Posting Virtuoso
 
0
  #4
Nov 17th, 2009
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?
I murdered thousands for the Emperor and he gave me nothing except his damning silence. Now his lapdogs yap for every life I take, while the gods promise me the galaxy.
- Svane Vulfbad -
Reply With Quote Quick reply to this message  
Join Date: Nov 2009
Posts: 3
Reputation: 00musdan is an unknown quantity at this point 
Solved Threads: 0
00musdan 00musdan is offline Offline
Newbie Poster

Well so far....

 
0
  #5
Nov 17th, 2009
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...
  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. }
Reply With Quote Quick reply to this message  
Reply

Message:




Views: 557 | Replies: 4
Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2010 DaniWeb® LLC