Develop a C# app that will determine whether any of several de- partment-store customers has exceeded the credit limit on a charge account. For each customer, the following facts are available:
a) account number,
b) balance at the beginning of the month,
c) total of all items charged by the customer this month,
d) total of all credits applied to the customer’s account this month and
e) allowed credit limit.
The app should input all these facts as integers, calculate the new balance (= beginning balance +
charges – credits), display the new balance and determine whether the new balance exceeds the cus-
tomer’s credit limit. For those whose credit limit is exceeded, the app should display the message
"Credit limit exceeded". Use sentinel-controlled iteration to obtain the data for each account.
Top:
Determine if each of an arbitrary number of department store customers has exceeded the credit limit on a charge account
First refinement:
Input customer’s data
For each customer, calculate and display the customer’s new balance, and display a
message if user’s balance exceeds credit limit
Process next customer
Second refinement:
Prompt the user for the first customer’s account number
Input the first customer’s account number
While the sentinel value (-1) has not been entered for the account number
Prompt the user for the customer’s beginning balance
Input the customer’s beginning balance
Prompt the user for the customer’s total charges
Input the customer’s total charges
Prompt the user for the customer’s total credits
Input the customer’s total credits
Prompt the user for the customer’s credit limit
Input the customer’s credit limit
Calculate and display the customer’s new balance
If the balance exceeds the credit limit
Print the account number
Print the credit limit
Print the balance
Print “Credit Limit Exceeded”
Input the next customer’s account number
You might also like to view...
Which of the following code examples is a function that will accept three integer parameters, calculate their average, and return the result?
a. ```Function Average(ByVal intX As Integer, ByVal intY As Integer, _ ByVal intZ As Integer) As Single Average = (intX + intY + intZ) / 3 End Function ``` b. ```Function Average(ByVal intX As Integer, ByVal intY as Integer, _ ByVal intZ As Integer) As Single Average = intX + intY + intZ / 3 Return Average End Function ``` c. ```Function Average(ByRef intX As Integer, ByRef intY as Integer, _ ByRef intZ As Integer, ByRef Average As Double) Average = (intX + intY + intZ) / 3 End Function ``` d. ```Function Average(ByVal intX As Integer, ByVal IntY as Integer, _ ByVal intZ As Integer) As Single Return (intX + intY + intZ) / 3 End Function ```
Hy Perteks would like a form to fill in as he learns about new software experts. Use the repository data structure called ADD SOFTWARE EXPERT to determine the fields required for the form.
What will be an ideal response?
Match the following versions of Windows with its description
I. Windows 98 II. Windows XP III. Windows Vista IV. Windows 7 V. Windows 8 A. Introduced a new interface, automatic updates, easier networking and Internet connectivity, and increased reliability B. Introduced a new interface, gadgets, enhanced networking, entertainment, and accessibility features C. Included Internet Explorer, better PnP support, and more multimedia features D. Has a new interface that uses a Start screen with tiles instead of a Start menu to access applications E. Included a redesigned taskbar, new ways to manipulate windows, Remote Media Streaming, and Windows Touch multi-touch technology
____ use(s) a challenge-response system.
A. Local authentication B. Biometrics C. Synchronous tokens D. Asynchronous tokens