Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro Database Migration To Azure Data Modernization For The Enterprise

Authors: Kevin Kline, Denis McDowell, Dustin Dorsey, Matt Gordon

1st Edition

1484282299, 978-1484282298

More Books

Students also viewed these Databases questions

Question

Advance warning and an explanation for the layoff.

Answered: 1 week ago

Question

Assessment of skills and interests.

Answered: 1 week ago