Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hi, this code has been showing me error and i dont know what is wrong with it please if i can get an extra look

Hi, this code has been showing me error and i dont know what is wrong with it please if i can get an extra look from someone else to fix the proble i will appreciate it. thanks.

/**

* Dispenses the remaining value in terms of a given coin value.

* Leaving the remaining balance as the new remaining value, and

* returning the amount of coins of the particular given value that

* can be dispensed.

*

* @param coinValue, value of the coin to be dispensed

* @return amount of the given coin value that can be dispensed

*/

private int dispenseCoin(int coinValue)

{

int count = 0;

// check if the remaining value can disburse at least one coin,

// if not do not perform any calculations

if (_remainingValue > coinValue)

{

count = _remainingValue / coinValue;

_remainingValue %= coinValue;

}

return count;

}

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

Automating Access Databases With Macros

Authors: Fish Davis

1st Edition

1797816349, 978-1797816340

More Books

Students also viewed these Databases questions

Question

U11 Informing Industry: Publicizing Contract Actions 317

Answered: 1 week ago