Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

To prevent a dollar amount from being altered, mostcomputerized check-writing sy

ID: 3561470 • Letter: T

Question

To prevent a dollar amount from being altered, mostcomputerized check-writing systems employ a technique calledcheck protection. hecks designed for imprinting by computercontain a fixed number of spaces in which the computer may print anamount.

Suppose a paycheck contains nine blank spaces in which thecomputer is supposed to print the amount of a weekly paycheck. If the amount is large, then all nine of those spaces will befilled--for example:

1, 230.60 (checkamount)

-----------

123456789 (position numbers)

On the other hand, if the amount is leassthan $1000, then several of the spaces will ordinarily be leftblank ----

for example:

99.87

-----------

123456789

Contains three blank spaces. If the check isprinted with blank spaces, it is easier for someone to alter theamount of the check. Tp prevent a check from being altered, manycheck-writing systems insert leading asterisks to protectthe amount as follows:

****99.87

------------

123456789

Write a program that inputs a dollar amount to be printed on a check and then prints the amount incheck-protected format with leading asterisks if necessary. Assume that nine spaces are available for printing an amount.

THEN

Write a second script that inputs a numeric checkamount and writes the word equivalent of the amount. For example, the amount 112.43 should be written as ONE HUNDRED TWELVE and 43/100.

( I need program in HTML/JAVASCRIPT code only please )

Thank you in advance

Explanation / Answer

queComputers are frequently used in check-writing systems, such as payroll
and accounts payable applications. Many stories circulate regarding weekly pay-
checks being printed (by mistake) for amounts in excess of $1 million. Weird
amounts are printed by computerized check-writing systems because of human
error and/or machine failure. Systems designers, of course, make every e?ort to
build controls into their systems to prevent erroneous checks from being issued.
Another serious problem is the intentional alteration of a check amount by some-
one who intends to cash it fraudulently. To prevent a dollar amount from being
altered, most computerized check-writing systems employ a technique called check
protection.
Checks designed for imprinting by computer contain a xed number of spaces in
which the computer may print an amount. Suppose a paycheck contains nine
blank spaces in which the computer is supposed to print the amount of a weekly
paycheck. If the amount is large, then all nine of those spaces will be lled|for
example:
11,230.60 (check amount)
---------
123456789 (position numbers)
On the other hand, if the amount is less than $1000, then several of the spaces will
ordinarily be left blank|for example,
99.87
---------
123456789
contains four blank spaces. If a check is printed with blank spaces, it is easier
for someone to alter the amount of the check. To prevent a check from being
altered, many check-writing systems insert leading asterisks to protect the amount
as follows:****99.87
---------
123456789
Write a program that inputs a dollar amount to be printed on a check and then
prints the amount in check-protected format with leading asterisks if necessary.
Assume that nine spaces are available for printing an amount.stion..

Modify the program in Fig. 10.21 so that the card dealing method deals a five-card poker hand. Then write the following additional methods:

10.4 Use the methods developed in Exercise 10.3 to write a program that deals two five-card poker hands, evaluates each hand, and determines which is the better hand.

10.5 Modify the program developed in Exercise 10.4 so that it can simulate the dealer. The dealer

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote