subject

Consider the following code:
cashregister register = new cashregister(); register. recordpurchase(19.93); register. receivepayment(20, 0, 0, 0, 0); system. out. print("change: "); system. out. println(register.;

the code segment prints the total as 0.0728. explain why. give a recom- mendation to improve the code so that users will not be confused.

i think the answer is that they use the wrong float point, but i don’t know how to expand from that! or if the answer is correct.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 16:30
Primary tech skills are skills that are necessary for success in online education
Answers: 3
question
Computers and Technology, 22.06.2019 17:30
1. before plugging in a new device to a computer you should unplug all other devices turn off the computer turn on the computer 2. many of the maintenance tools for a computer can be found in the control panel under administrative tools display personalization
Answers: 1
question
Computers and Technology, 22.06.2019 23:00
Is an attack that relies on guessing the isns of tcp packets
Answers: 2
question
Computers and Technology, 23.06.2019 13:10
What is domain name system (dns)? allows dynamic ip address allocation so users do not have to have a preconfigured ip address to use the network converts ip addresses into domains, or identifying labels that use a variety of recognizable naming conventions the efficient coexistence of telephone, video, and data communication within a single network, offering convenience and flexibility not possible with separate infrastructures the integration of communication channels into a single service
Answers: 2
You know the right answer?
Consider the following code:
cashregister register = new cashregister(); register. recordpur...
Questions
question
Mathematics, 26.02.2021 18:30
question
Health, 26.02.2021 18:30