Question: JAVA Problem. Please help with my programming assignment. Write a cash register class. It should have the following methods: AddTransaction(amount) add an amount to a

JAVA Problem. Please help with my programming assignment.

Write a cash register class. It should have the following methods:

AddTransaction(amount) add an amount to a running total and increments the number of transactions

TransactionCount( ) returns the number of transactions received

Total( ) returns the sum of the amounts of the transactions

ResetTransactions( ) sets the total amount and transaction count to 0

Register Count( ) returns the number of cash registers created

Next, write an application that instantiates at least two cash register objects to prove that your class works. P.S.: Don't worry about storing each individual transaction, and we are dealing only with totals. No need to handle individual orders/items per transaction.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!