Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This is for my Object Oriented Programming class, I need help in creating a client class that takes int value (dollar) of the users input
This is for my Object Oriented Programming class, I need help in creating a client class that takes int value (dollar) of the users input and converts it into change value for remaining quarters, dimes, nickels, and pennies. I know that modulus will be of use in this program. Heres what I have as a logic so far... users input = int quarter = int /25 int = int % 25 dime = int / 10 int = int % 10 nickel = int / 5 int = int % 5 pennies = int If print those value types out, they would print as expected for changes. I need help in setting it as JavaScript.
I need help in creating a client class that takes int value (dollar) of the users input and converts it into change value for remaining quarters, dimes, nickels, and pennies.
I know that modulus will be of use in this program. Heres what I have as a logic so far...
users input = int
quarter = int /25
int = int % 25
dime = int / 10
int = int % 10
nickel = int / 5
int = int % 5
pennies = int
If print those value types out, they would print as expected for changes.
I need help in setting it as JavaScript.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started