Results 1 to 2 of 2

Thread: Java programming

  1. #1
    Join Date
    Oct 2011
    Posts
    2

    Exclamation Java programming - counter to the CashRegister class

    Hello,
    I am currently enrolled in an AP computer science class and i am having a bit of trouble with some of the assignments and our teacher refuses to help us saying that we need to figure it out on our own. I have basically no backround information when it comes to programmind and i was told that in this class you are taught from the beginning. We have recently been told to make a CashRegister class and a CashRegisterTester class to test the first class. I was able to make both classes without a problem but now i have to had a counter to the CashRegister class so that it keeps track of the total number of items in a sale and then add a tester for this in the CashRegisterTester class any help would be greatly appreciated. If you want to look at my classes just ask for it in a private message.
    Thanks,
    Overlord94

  2. #2
    Join Date
    Dec 2007
    Posts
    2,291

    Re: Java programming

    Can you tell us which method in the CashRegister class is represented as ringing up an item? If you found it, what you need to do is to add a variable type integer which will be increased by 1 each time an item is counted as purchased to the class. Remember to declare it as the class's variable, not a method's variable.

Similar Threads

  1. Object oriented programming with java
    By cloud101 in forum Software Development
    Replies: 2
    Last Post: 22-02-2012, 01:11 AM
  2. Help with java programming term
    By cloud101 in forum Software Development
    Replies: 1
    Last Post: 06-02-2012, 01:45 PM
  3. Java Programming using Adventnet SNMP Java API
    By ROCKING_Suhas in forum Software Development
    Replies: 5
    Last Post: 17-07-2010, 06:52 AM
  4. What is RMI in java programming?
    By Sonam Goenka in forum Software Development
    Replies: 5
    Last Post: 12-03-2010, 08:37 PM
  5. How to Start programming in JAVA ?
    By Keegan in forum Software Development
    Replies: 11
    Last Post: 22-12-2008, 02:02 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,906,577.41475 seconds with 17 queries